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 keyword with example?
List the difference between a 'copy constructor' and a 'assignment operator' in C?
What does c value mean?
What is the explanation for prototype function in c?
What is nested structure?
What is a newline escape sequence?
What is main return c?
a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor
What is a null pointer in c?
how can I convert a string to a number?
What is the c value paradox and how is it explained?
What is the use of parallelize in spark?
What are different types of variables in c?
develop algorithms to add polynomials (i) in one variable
In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)