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 / a.ramachandiran b.sc cs
#include<stdio.h>
#include<conio.h>
void main()
{
int m,n,i;
clrscr();
printf("\nEnter a number : ");
scanf("%d",&n);
for(i=1;i<=n/2;i++)
{
if(n==(i*i))
m==1;
else
m==0;
}
if(m==1)
printf("\nGiven number is square of sum");
else
printf("\nGiven number is not square of sum");
getch();
}
Is This Answer Correct ? | 3 Yes | 16 No |
Post New Answer View All Answers
What is the explanation for modular programming?
write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?
What is the difference between near, far and huge pointers?
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
The file stdio.h, what does it contain?
Explain why c is faster than c++?
what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)
When was c language developed?
application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above
Define and explain about ! Operator?
how we can make 3d venturing graphics on outer interface
Explain how do you determine a file’s attributes?
Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.
Write a program to use switch statement.
What is a const pointer in c?