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 the purpose of void in c?
What is structure of c program?
Explain pointer. What are function pointers in C?
What is scope and lifetime of a variable in c?
while initialization of array why we use a[][2] why not a[2][]...?
What are valid operations on pointers?
A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?
Explain the use of keyword 'register' with respect to variables.
regarding pointers concept
what are the 10 different models of writing an addition program in C language?
What is the use of pragma in embedded c?
.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
What is structure pointer in c?
How can this be legal c?