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


Please Help Members By Posting Answers For Below Questions

Explain how can I make sure that my program is the only one accessing a file?

606


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

625


Explain what is the difference between a string and an array?

620


What Is The Difference Between Null And Void Pointer?

627


Write a program to reverse a string.

625






Define Spanning-Tree Protocol (STP)

634


The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?

751


What is a volatile keyword in c?

627


What does calloc stand for?

636


What is #include cctype?

567


what is the format specifier for printing a pointer value?

603


What is string function c?

558


What are lookup tables in c?

538


How can I remove the trailing spaces from a string?

598


How can I call fortran?

630