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
Explain how can I make sure that my program is the only one accessing a file?
we called a function and passed something do it we have always passed the "values" of variables to the called function. such functions calles are called a) calls by reference b) calls by value c) calls by zero d) none of the above
Explain what is the difference between a string and an array?
What Is The Difference Between Null And Void Pointer?
Write a program to reverse a string.
Define Spanning-Tree Protocol (STP)
The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?
What is a volatile keyword in c?
What does calloc stand for?
What is #include cctype?
what is the format specifier for printing a pointer value?
What is string function c?
What are lookup tables in c?
How can I remove the trailing spaces from a string?
How can I call fortran?