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

What are header files and what are its uses in C programming?

1228


How does #define work?

1063


What is the difference between typedef and #define?

1054


What are different types of operators?

1038


What is the difference between #include

and #include “header file”?

1027


What do header files do?

1072


Explain enumerated types.

1030


Which header file is essential for using strcmp function?

1477


What does printf does?

1242


What is FIFO?

1698


What are the advantages of using Unions?

1116


All technical questions

1987


If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402

3915


What is the purpose of 'register' keyword?

1098


An organised method of depicting the use of an area of computer memory used to signify the uses for different parts of the memory a) swap b) extended memory c) memory map d) all of the above

1169