Advertisement
SergeyPGUTI

3.2.13

Sep 30th, 2015
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     int n,a,Sum=0,e,d,s;
  9.     for (int i=100;i<=999;i++)
  10.     {
  11.         a=i*i;
  12.         e=a%10;
  13.         a/=10;
  14.         d=a%10;
  15.         a/=10;
  16.         s=a%10;
  17.         a/=10;
  18.         if(i==(s*100+d*10+e)) cout<<i<<" ";
  19.     }
  20.     return 0;
  21. }
  22. ОТВЕТ 376  625
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement