unix system. It is for my intro Computer Science class. It is from the
Deitel book, "How to program C++." Thanks.

2.55    (Pythagorean Triples) A right triangle can have sides that are all
integers.  The set of three integer values for the sides of a right
triangle is called a Pythagorean triple.  These three sides must satisfy
the relationship that the sum of the squares of two of the sides is equal
to the square of the hypotenuse.  Find all Pythagorean triples for side l,
side2, and the hypotenuse all no larger than 500.  Use a triple-nested
for-loop that tries all possibilities.  This is an example of "brute
force" computing.  You will learn in more advanced computer science
courses that there are large numbers of interesting problems for which
there is no known algorithmic approach other than using sheer brute force.

> Please help me by sending me the code for this C++ program. It is for a
> unix system. It is for my intro Computer Science class. It is from the
> Deitel book, "How to program C++." Thanks.

> 2.55    (Pythagorean Triples) A right triangle can have sides that are all
> integers.  The set of three integer values for the sides of a right
> triangle is called a Pythagorean triple.  These three sides must satisfy
> the relationship that the sum of the squares of two of the sides is equal
> to the square of the hypotenuse.  Find all Pythagorean triples for side l,
> side2, and the hypotenuse all no larger than 500.  Use a triple-nested
> for-loop that tries all possibilities.  This is an example of "brute
> force" computing.  You will learn in more advanced computer science
> courses that there are large numbers of interesting problems for which
> there is no known algorithmic approach other than using sheer brute force.

In good old C this would be:

#include <stdio.h>
main()
{
long int a,b,c;

for (a=1; a<=500; a++)
{
for (b=1; b<=500; b++)
{
for (c=1; c<=500; c++)
{
if( (a*a + b*b) == c*c)
{
printf("a: %d b:%d c:%d\n",a,b,c);
}
}
}
}
return(0);

Quote:}

-Enrique

Everything ran WONDERFUL for about 4 months this machine ran several
servers it is a UDB w/ 340mb SCSI (SLOW 5mb) half inch internal hard
drive.  32 megs of true parity ram, Red hat 5.0 I get the following
error

NCR53-810-0: ERROR (0:48) (0-20-0) (8/33) * scripth (868:18000400).
NCR53-810-0: Script cmd = 888030000
NCR53-810-0: regdump : da 10 80 33 47 08 00 1f 01 08 00 28 80 00 08 00
NCR53-810-0: have to clear fifos

What the HELL is this and is there anyway to fix it ?  It seems to
occur when doing file writing, when i try to tar something for example
it will go into a continual unending loop displaying the above error
message.  I have refdisked, formated, and clean installed redhat and