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 are nested functions in c?
What are the loops in c?
What is meant by high-order and low-order bytes?
What does %d do in c?
What is pointers in c with example?
Ow can I insert or delete a line (or record) in the middle of a file?
Write a program to check palindrome number in c programming?
Explain what is a static function?
How can a string be converted to a number?
What are the disadvantages of a shell structure?
Write program to remove duplicate in an array?
Difference between pass by reference and pass by value?
How can I invoke another program (a standalone executable, or an operating system command) from within a c program?
Explain what is a 'locale'?
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none