asked 740 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.

asked
User LacOniC
by
8.3k points

1 Answer

3 votes
#include

int main()
{
int num;
scanf("%d", &num);
printf("%d", num*num);
return 0;
}
answered
User Pqvst
by
7.8k points
Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.