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 / rajesh kumar
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
printf("\n give an integer value");
scanf("%d",&a);
if((a/(a/2))==(a/2))
printf("\n the variable is square of some no");
else
printf("\n the no is not square of some no");
getch();
}
| Is This Answer Correct ? | 2 Yes | 32 No |
Post New Answer View All Answers
Is c is a middle level language?
How will you find a duplicate number in a array without negating the nos ?
Why & is used in scanf in c?
What is string function c?
What is the use of clrscr?
What does c mean in standard form?
What Is The Difference Between Null And Void Pointer?
Explain can static variables be declared in a header file?
"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above
What is selection sort in c?
What is #pragma statements?
Write a code to generate divisors of an integer?
which is an algorithm for sorting in a growing Lexicographic order
What are the types of arrays in c?
How many types of arrays are there in c?