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
Why can't I perform arithmetic on a void* pointer?
What is the use of gets and puts?
Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.
Which is better between malloc and calloc?
Can you please compare array with pointer?
Are comments included during the compilation stage and placed in the EXE file as well?
how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software
Can you write a programmer for FACTORIAL using recursion?
What are the 3 types of structures?
What is "Hungarian Notation"?
find the sum of two matrices and WAP for it.
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers
how do you execute a c program in unix.
What is string concatenation in c?
all c language question