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
What is const keyword in c?
What is an example of structure?
What does 1f stand for?
What is your stream meaning?
Explain what is the benefit of using const for declaring constants?
What is the role of && operator in a program code?
Explain what will the preprocessor do for a program?
what do the 'c' and 'v' in argc and argv stand for?
What is array of structure in c?
Here is a good puzzle: how do you write a program which produces its own source code as output?
What is the condition that is applied with ?: Operator?
PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM
What is the difference between declaring a variable by constant keyword and #define ing that variable?
Why can arithmetic operations not be performed on void pointers?
Is null always defined as 0(zero)?