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
How many types of operator or there in c?
Sir i need notes for structure,functions,pointers in c language can you help me please
What are the data types present in c?
Explain the difference between exit() and _exit() function?
What is the difference between new and malloc functions?
Write a program to print "hello world" without using a semicolon?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.
write a program to rearrange the array such way that all even elements should come first and next come odd
What will be your course of action for a push operation?
Can you please explain the scope of static variables?
Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.
Can include files be nested?
What does the file stdio.h contain?
Are the expressions * ptr ++ and ++ * ptr same?
What is methods in c?