733 views
3 votes
Write a complete program thatdeclares an integer variable,reads a value from the keyboard into that variable, andwrites to standard output the square of the variable's value.besides the number, nothing else should be written to standard output.

User LacOniC
by
7.9k points

1 Answer

3 votes
#include

int main()
{
int num;
scanf("%d", &num);
printf("%d", num*num);
return 0;
}
User Pqvst
by
7.2k points