/*C Program To Find The Square root of a given number*/ #include <stdio.h> #include <stdlib.h> int main() { int n,i; printf("Enter the value: \n"); scanf("%d",&n); for(i=1;i<=n/2;i++) if(i*i==n) printf("Square root of a given number is = %d\n",i); return 0; }
Enter the value: 49 Square root of a given number is = 7
No comments:
Post a Comment