Advertisement
Guest User

Untitled

a guest
Feb 20th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     ios::sync_with_stdio(false);
  8.     cin.tie(0);
  9.  
  10.     long long n;
  11.     while(cin >> n && n)
  12.     {
  13.         long long sq = sqrt(n);
  14.         if(sq * sq == n) ///Perfect square
  15.             cout << "yes\n";
  16.         else
  17.             cout << "no\n";
  18.     };
  19.  
  20.     return 0;
  21. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement