answersLogoWhite

0


Best Answer

#include <stdio.h>

#include <math.h>

int testsq(int s) //returns true if s is a perfect square and not zero

{

if (s==0) return 0;

int r=sqrt(s);

return (r*r == s);

}

main()

{

int i,up2,low2;

for(i=1;i<100;++i) {

up2=(i*i)/100; low2=(i*i)%100;

if (testsq(up2)&&testsq(low2))

printf("%d: %d %d\n",i,up2,low2);

}

}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program which finds four digit perfect squares where the number represented by the first two digits and the number represented by the last two digits are also perfect squares?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Can perfect squares have decimals?

Perfect squares cannot have digits after the decimal point.


What number comes next in the sequence 61 691 163 487 4201?

9631. The sequence consists of the prime numbers which, when their digits are reversed, are perfect squares.


What is the square root of 169 196?

169 and 196 are perfect squares. Their square roots are 13 and 14 respectively. The perfect squares from 1^2 to 16^2 are: 1,4, 9, 16, 25, 36, 49, 64, 81, 100, 144, 169, 196, 225, 256. It is useful to memorize the perfect squares, as it makes estimating square roots easier. In case you wanted to find the square root of 169,196, the answer is roughly 411.334414... The square roots of integers which are not perfect squares are irrational, so they can not be expressed exactly as a sequence of digits.


What number is a perfect square whose only prime factor is 2 and is a factor of 32 and has a sum of its digits that is odd?

It is a factor of 32, which means it is one of 1, 2, 4, 8, 16, and 32. The perfect squares among the factors of 32 are 4 and 16. Of those two, the only one with a sum of digits that is odd is 16.


Highest number represented by 2 digits?

99


How many of the numbers from 10 to 96 have the sum of their digits equal to a perfect square?

the highest sum of the numbers is 17 and the lowest is 1. The only perfect squares in that range are 1,4,9, and 16. That means the following numbers will work: 10,13.18,22,27,31,36,40,45,54,63,72,79,81,88, and 90; that is 16 numbers


What is the largest value that can represented by 3 hex digits?

409610


How is 13 a happy number?

The sum of the squares of the digits of 13 is 12 + 32 = 10. The sum of the squares of the digits of this result is 12 + 02 = 1. Because this process results in a 1, this number is a happy number.


How do you get 7 squares with 12 toothpicks?

7 squares is forty nine so you remove two toothpicks to make the digits 49


What are some mathmetical facts about 26?

Prime factorization: 26 = 2 * 13 It can be represented as the sum of two squares: 26 = 12 * 52 26 is an even number. 26 in base 3 is a repetition of 3 digits: 26 = 2223


What is the largest number of items that can be represented with four hexadecimal digits?

It is 65535.


Is there a perfect number with eight digits?

Yes, there is. It is 33550336.