answersLogoWhite

0


Best Answer

#include <stdio.h>

#include <math.h>

int main(void)

{

int number;

double result;

printf ("\n Introduce an integer: ");

scanf ("%i", &number);

result= sqrt (number);

if ((result * result)== number)

printf ("\n The integer HAS a perfect square \n\n");

else

printf ("\n The integer DOES NOT HAVE a perfect square \n\n");

getch ();

}

Shrikanth Ganure

The Oxford College of Engineering (MCA-2010 Batch)

Bangalore..

User Avatar

Wiki User

โˆ™ 2011-01-11 12:14:51
This answer is:
User Avatar
Study guides

Algebra

20 cards

A polynomial of degree zero is a constant term

The grouping method of factoring can still be used when only some of the terms share a common factor A True B False

The sum or difference of p and q is the of the x-term in the trinomial

A number a power of a variable or a product of the two is a monomial while a polynomial is the of monomials

โžก๏ธ
See all cards
3.74
โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…
834 Reviews

Add your answer:

Earn +20 pts
Q: C program to check given number is a perfect square or not?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you check if a number is a perfect square?

For a number to be a perfect square, the number's square root has to be a whole number. 9 is a perfect square because its square root is a whole number, 3. If the square root of the number is a decimal, then it is not a perfect square. For example, 13 does not divide evenly so it not a perfect square.


How to draw a flowchart to check if a number is a perfect square?

dot you will draw that's all thank you for selected


Method to check the given number is perfect square?

Simple and easy solution:- http://codepad.org/svhkJpxp


Write a c program using while loop to accept a number check and display message whether number is perfect or not?

The program is here guys.......... //Finding whether the given number is perfect or not //Starts here #include&lt;stdio.h&gt; void main() { int i=1,temp=0,number; scanf("%d",&amp;number); while(i&lt;=number/2){ if(number%i==0) temp+=i; i++; } if(temp==number) printf("Its a perfect number"); else printf("Its not a perfect number"); } //ends here


Could you write a assembly language program in tasm To check whether a given number present in a sequence of given memory location containing the string to be checked in 8086?

8086 assembly language program to check wether given number is perfect or not


Java script program to check a number is Armstrong number?

write a java program when you enter a number check number is Armstrong or not?


How do you check whether a number is a square number?

if it's square root is an integer, it is a square number.


How do you know if a number is square number?

I'm assuming you're wondering if a number is a perfect square? Well, memorization will help as will guess and check. However, if you feel like doing it all by hand, simplifying the square will help you determine if it is a perfect square. Example: let's figure out if the number 225 is a perfect square. Let's take 225 and factor it. When you factor this number, you want to look at factoring numbers which are a perfect square in and of themselves. So 22 is 4, but that doesn't factor, how about 52 ? 25 will indeed factor, so we have 25*9 (look at that, 9 is also a factor). If we split it up like this, we have sqrt(25*9). We can take the square root of these individually and multiply them together. sqrt(25)*sqrt(9) = 5*3 = 15. Therefore 225 is a perfect square of 15.


Is this a perfect square trinomial 9x2 12x 4?

Yes, it is the square of (3x + 2). 3x is the square root of 9x2; 4 is the square of 2; to check whether it is a perfect square, the center term must be twice (3x times 2).


Why is 469 a perfect number?

It isn't. In fact, not a single odd perfect number is known so far. To check this, just use the definition of a perfect number: in this case, add all the factor of 467 other than 469 itself, and check whether you get 469.


Write a program to enter a number and check whether number is divisible by 7 or not?

wap to input a number and check whether it is divisible by 7 or no


How do you determine if a number is a square number?

To check if your number is a square number, draw little dots. like, for 4 it will 2 dots by 2 dots. if this doesn't work equally, it is not a square number.

People also asked