63 109
Assignments Done
99%
Successfully Done
In July 2018

Answer to Question #17533 in C++ for ivan

Question #17533
write a program in C which prompts the user to enter an integer,then calculates it's square and displays the integer with the square on the screen
Expert's answer
#include <stdio.h>

using namespace std;

int main ()
{
intinteger;
printf("Enter an integer, please: ");
scanf("%d",&integer);

intsquare = integer*integer;
printf("
Square of %d = %d
" , integer, square);

return0;

}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions