Advertisement
Mr_D3a1h

Untitled

Mar 9th, 2021
651
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <stdio.h>
  2. #include "iostream"
  3. #include "math.h"
  4. using namespace std;
  5. int main()
  6. {
  7.     int numbers,i,n,counter = 0;
  8.     for (i = 0;i<1000;i++)
  9.     {
  10.         while(i)
  11.         {
  12.             i = i*10+n%10;
  13.             n /= 10;
  14.         }
  15.         if ( sqrt(i) % 1 == 0)
  16.             counter ++;
  17.     }
  18.     cout << counter << endl;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement