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 / rajesh kumar
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
printf("\n give an integer value");
scanf("%d",&a);
if((a/(a/2))==(a/2))
printf("\n the variable is square of some no");
else
printf("\n the no is not square of some no");
getch();
}
| Is This Answer Correct ? | 2 Yes | 32 No |
Post New Answer View All Answers
What is a rvalue?
What is the purpose of type declarations?
Why is a semicolon (;) put at the end of every program statement?
the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b
What is wrong with this statement? Myname = 'robin';
how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?
which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above
How can I do graphics in c?
HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????
Can a pointer be null?
What is the purpose of main( ) in c language?
How is a pointer variable declared?
Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......
What is #include stdio h?
What does 3 periods mean in texting?