+ 2
int n,s; cin>>n; if(n>100&&n<1000){ s=(n%100)/10; cout<<s*s;} else cout<<n*n;
3rd Jan 2018, 3:50 PM
Gudla Swathi
Gudla Swathi - avatar
+ 2
if n is not a three digit number
3rd Jan 2018, 3:54 PM
Gudla Swathi
Gudla Swathi - avatar
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.
10th May 2021, 3:37 PM
Snigdha Mohanty
Snigdha Mohanty - avatar