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 register variable in c language?
Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.
What is the use of linkage in c language?
Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1
write a program to find the given number is prime or not
What are identifiers c?
What are the types of assignment statements?
how could explain about job profile
How do I read the arrow keys? What about function keys?
general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only
What are the 4 types of programming language?
What is the size of enum in c?
Explain #pragma statements.
Explain two-dimensional array.
Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?