Advertisement
sazid_iiuc

Untitled

May 30th, 2020
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. main()
  5. {
  6.     //ifstream cin("10110.in");
  7.     //ofstream cout("10110.out");
  8.     while (true)
  9.     {
  10.         int n, count = 0;
  11.  
  12.         cin >> n;
  13.  
  14.         int temp = sqrt(n);
  15.  
  16.         if (n == 0)
  17.         {
  18.             break;
  19.         }
  20.         else
  21.         {
  22.             if (temp * temp == n)
  23.             {
  24.                 cout << "YES" << endl;
  25.             }
  26.             else
  27.                 cout << "NO" << endl;
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement