#include <stdio.h>
int Square(int a);
int main ()
{
/* variable definition: */
int a;
{
printf ("Enter a positive Integer\n: ");
scanf("%d", &a);
(a > 0);
{
printf ("This code will calculate square \n: ");
// Call the Square Function
(a * a);
printf("Square of %d is %d\n",a);
return a * a;
}
}
return 0;
}
Enter a positive Integer
: This code will calculate square
: Square of 12 is -181033120
please help me refine this so i can get the correct answer
int Square(int a);
int main ()
{
/* variable definition: */
int a;
{
printf ("Enter a positive Integer\n: ");
scanf("%d", &a);
(a > 0);
{
printf ("This code will calculate square \n: ");
// Call the Square Function
(a * a);
printf("Square of %d is %d\n",a);
return a * a;
}
}
return 0;
}
Enter a positive Integer
: This code will calculate square
: Square of 12 is -181033120
please help me refine this so i can get the correct answer
Comment