DEV Community

krishna kakade
krishna kakade

Posted on

LightMoreLight Problem in c

Light More Light Problem implementation in c

#include <stdio.h>
#include <math.h>
int main(void) {
     int no;
    int y;
  printf("enter the to find a square root");
  scanf("%u",&no);
   while(1){
        scanf("%u",&no);
        if(no==0) break;

        y=sqrt(no);

        if(y==y*y) 
        printf("yes\n");
        else 
        printf("no\n");
    }

    return 0;
}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)