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


Please Help Members By Posting Answers For Below Questions

What language is windows 1.0 written?

578


Explain what are the different file extensions involved when programming in c?

638


Why isnt there a numbered, multi-level break statement to break out

591


Why is main function so important?

619


What is the data segment that is followed by c?

617






What is table lookup in c?

633


explain how do you use macro?

669


What is the purpose of scanf() and printf() functions?

725


Explain what header files do I need in order to define the standard library functions I use?

649


Does c have enums?

604


Where are the auto variables stored?

627


What are the scope of static variables?

604


Subtract Two Number Without Using Subtraction Operator

360


what is a function method?give example?

1918


What is a lvalue

668