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
What language is windows 1.0 written?
Explain what are the different file extensions involved when programming in c?
Why isnt there a numbered, multi-level break statement to break out
Why is main function so important?
What is the data segment that is followed by c?
What is table lookup in c?
explain how do you use macro?
What is the purpose of scanf() and printf() functions?
Explain what header files do I need in order to define the standard library functions I use?
Does c have enums?
Where are the auto variables stored?
What are the scope of static variables?
Subtract Two Number Without Using Subtraction Operator
what is a function method?give example?
What is a lvalue