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 / satya

#include<stdio.h>
#include<math.h>
#include<stdlib.h>

int main()
{
int r,n,s;
printf("Enter the number : ");
scanf("%d",&s);
n=sqrt(s);
r=n*n;
if(r==n)
printf("%d is a square of %d ",s,n);
else
printf("%d is not a square number",s);

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the process to generate random numbers in c programming language?

1175


Explain built-in function?

1132


how to print the character with maximum occurence and print that number of occurence too in a string given ?

2464


What is this pointer in c plus plus?

1084


how to find binary of number?

4439


What are integer variable, floating-point variable and character variable?

1245


In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none

1203


What is static volatile in c?

1019


Is there a way to switch on strings?

1083


Explain About fork()?

1113


Explain what are compound statements?

1057


What is the difference between #include and #include 'file' ?

1050


Explain what are reserved words?

1101


the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above

1045


In which header file is the null macro defined?

1341