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

How can I copy just a portion of a string?

1282


Is void a keyword in c?

936


printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions

1113


How can you increase the allowable number of simultaneously open files?

1100


Write a program to print factorial of given number using recursion?

969


What is clrscr ()?

1069


Explain what are the different file extensions involved when programming in c?

1067


Tell me when would you use a pointer to a function?

1030


Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon

2250


What does %p mean?

1040


Explain spaghetti programming?

1201


What is the use of pointers in C?

1038


Write a program to print "hello world" without using a semicolon?

1023


What does typedef struct mean?

1057


What is #include cctype?

1085