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 / manvi
main()
{
int i,b,j;
printf("enter the no");
scanf("%d",&i);
for(j=1;j<i;j++)
{
b=j*j;
if(i==b)
{
printf("this no is squre of: %d",j);
return;
}
}
printf("not a square no");
}
Is This Answer Correct ? | 1 Yes | 4 No |
Post New Answer View All Answers
Write a program to show the change in position of a cursor using c
What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file
What are types of functions?
What is a stream water?
i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....
What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
how to capitalise first letter of each word in a given string?
How can a number be converted to a string?
Explain what is the difference between a free-standing and a hosted environment?
What is sizeof c?
What do you mean by dynamic memory allocation in c?
Is c call by value?
What is null character in c?
Is c procedural or object oriented?
Why is #define used?