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
Ow can I insert or delete a line (or record) in the middle of a file?
What is file in c preprocessor?
a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list
What are the advantages of Macro over function?
What is the difference between a string and an array?
What are the advantages of using Unions?
Can main () be called recursively?
How are structure passing and returning implemented?
What is the method to save data in stack data structure type?
What is the size of empty structure in c?
write a program to print largest number of each row of a 2D array
What are header files and what are its uses in C programming?
How can I find the modification date and time of a file?
Why can’t we compare structures?
Can you write the algorithm for Queue?