+ 2
Write a C++ program to calculate the square of mid digit of a 3 digit number. (Without loop)
plz help me guys...m not getting answer of this question...
4 Answers
+ 2
int n,s;
cin>>n;
if(n>100&&n<1000){
s=(n%100)/10;
cout<<s*s;}
else
cout<<n*n;
+ 2
if n is not a three digit number
+ 1
can u explain me how to execute this
0
Write a c++ program which requests the user to enter a number.The number and the squares of the number are then printed on the same line.