+ 4
Can't understand what are you trying to do ,but you need to pass address of a like &a to scanf function where the value will be stored
0
You got already explanation, if it is still unclear to you then check this corrected code...
#include<stdio.h>
int main() {
int a ;
printf("add the number\n");
scanf("%d\n", &a);
printf("the squared number is\n");
printf("%d",a*a);
return 0;
}
0
You are getting a number stored as variable a .then you are going to square the number you got.finally you have to print the squares number.here the mistake you made is you should use printf to display the result.