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 / rj
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
printf("\n give a number");
scanf("%d",&a);
for(b=1;b<a;b++)
{
if((a)==(b*b))
printf("\n the no is ");
//else
//printf("\n the no is not");
//break;
}
getch();
}
| Is This Answer Correct ? | 31 Yes | 6 No |
Post New Answer View All Answers
What do the functions atoi(), itoa() and gcvt() do?
What is difference between scanf and gets?
plz let me know how to become a telecom protocol tester. thank you.
Describe how arrays can be passed to a user defined function
Does c have enums?
When should a type cast be used?
What is a macro?
Can we compile a program without main() function?
What are the application of c?
Which is best linux os?
What is the use of void pointer and null pointer in c language?
Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?
how to capitalise first letter of each word in a given string?
How can I call a function with an argument list built up at run time?
What is data structure in c programming?