Write a program which take a integer from user and tell
whether the given variable is squar of some number or not.
eg: is this number is 1,4,9,16... or not

Answer Posted / swapnil chhajer

#include<stdio.h>
#include<math.h>
#include<stdlib.h>

int main()
{
int n;
printf("Enter the number : ");
scanf("%d",&n);

(n == (int)sqrt(n) * (int)sqrt(n)) ? printf("YES") :
printf("NO");

fflush(stdin);
getchar();
return 0;
}

Is This Answer Correct ?    6 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an lvalue?

624


why wipro wase

1817


in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.

7379


What is a program?

647


write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.

3493






Can a variable be both static and volatile in c?

596


What is the difference between fread and fwrite function?

629


Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)

1854


How can you pass an array to a function by value?

593


What is nested structure with example?

611


Write a program to print fibonacci series using recursion?

577


Write a program with dynamically allocation of variable.

593


Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?

2044


Explain data types & how many data types supported by c?

569


What does c value mean?

612