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


Please Help Members By Posting Answers For Below Questions

What is register variable in c language?

590


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.

2643


What is the use of linkage in c language?

603


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

3636


write a program to find the given number is prime or not

3817






What are identifiers c?

555


What are the types of assignment statements?

619


how could explain about job profile

1443


How do I read the arrow keys? What about function keys?

606


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

576


What are the 4 types of programming language?

572


What is the size of enum in c?

608


Explain #pragma statements.

595


Explain two-dimensional array.

615


Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?

649