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 difference between typedef and #define?
A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none
Explain what is the heap?
Write a program to find the biggest number of three numbers in c?
What is pragma in c?
What is nested structure in c?
Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014 Npu university
What is oops c?
explain what is fifo?
What is operator precedence?
How would you use the functions fseek(), freed(), fwrite() and ftell()?
What are the differences between Structures and Arrays?
Why is c so powerful?
What are the string functions? List some string functions available in c.
In which header file is the null macro defined?