Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Apart from dennis ritchie who the other person who contributed in design of c language.

1343


How do you redirect a standard stream?

1068


Simplify the program segment if X = B then C ← true else C ← false

2973


If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above

1013


What is cohesion in c?

936


What is the maximum length of an identifier?

1155


What will be your course of action for a push operation?

1066


I need previous papers of CSC.......plz help out by posting them.......

2262


What is the difference between char array and char pointer?

1006


Write a program for Overriding.

1129


what is different between auto and local static? why should we use local static?

1091


What is 1f in c?

2597


How does #define work?

1032


What is define c?

1020


What is ambagious result in C? explain with an example.

2566