C LANGUAGE - TO FIND GIVEN NUMBER IS A PERFECT SQUARE OR NOT?

// find perfect squre root #include<stdio.h> #include<math.h> int main() { int n,a; printf("Enter the value of N:\n"); scanf("%d",&n); a=sqrt(n); if(n-(a*a)==0) printf("\n\n\nIt is perfect squre"); else printf("\n\n\nIt is not perfect squre"); }
Note: Click on copy button to copy the given code and you can paste it in any online compiler to see the result, IF YOU ARE A MOBILE USER THEN DOWNLOAD "CODING C"(Free App) COMPILER FROM GOOGLE PLAY STORE.