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
What is the use of gets and puts?
How do c compilers work?
Is return a keyword in c?
What is exit() function?
how to find anagram without using string functions using only loops in c programming
Can you explain what keyboard debouncing is, and where and why we us it? please give some examples
What is the correct code to have following output in c using nested for loop?
Can true be a variable name in c?
Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......
Difference between MAC vs. IP Addressing
What is putchar() function?
What are keywords c?
What is extern variable in c with example?
In C, What is the #line used for?
What does 3 periods mean in texting?