ACCEPTED !! Simpler than i thought....
____________________________________________________________________
Question: Light, More Light
____________________________________________________________________
#include "iostream.h"
#include "math.h"
int main() {
while(true) {
unsigned int n;
cin >> n;
if(n == 0) break;
int root = sqrt(n);
if((root * root) == n) cout << "yes\n";
else cout << "no\n";
}
return 0;
}
____________________________________________________________________
No comments:
Post a Comment