Advertisement
Guest User

Untitled

a guest
Mar 6th, 2015
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.30 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3. int main(){
  4.     unsigned int lightbulbs;
  5.  
  6.     while(scanf("%u", &lightbulbs)==1){
  7.         if(lightbulbs==0)
  8.             break;
  9.  
  10.         if(((unsigned int)sqrt(lightbulbs))*((unsigned int)sqrt(lightbulbs))==lightbulbs)
  11.             printf("yes\n");
  12.         else
  13.             printf("no\n");
  14.  
  15.     }
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement