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
What is structure padding and packing in c?
What is static function in c?
Was 2000 a leap year?
What is sizeof c?
please explain every phase in the "SDLC" in the dotnet.
Are pointers really faster than arrays?
Explain Basic concepts of C language?
Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.
Explain the difference between the local variable and global variable in c?
How can I prevent another program from modifying part of a file that I am modifying?
What is %s and %d in c?
What are structure types in C?
Why we write conio h in c?
What is the purpose of 'register' keyword?
how to write a c program to print list of fruits in alpabetical order?