All pastes #903257 Raw Edit

Miscellany

public text v1 · immutable
·published 2008-02-14 03:17 UTC
rendered paste body
// Alexander Clark
// 1/23/08
// Homework 4
// P. 237-238 (5.20, 5.21)

public class Phythagorean{

	public static void main(String[] args) 
	{
		int side1;
		int side2;
		int hypo;
	
		for(side1 = 0; side1 <= 499; side1++);
		{
			
			
			for(side2 = 0; side2 <=499; side2++);
			{
				
				
				for(hypo = 0; hypo <= 499; hypo++);
				{
					if((side1*side1)+(side2*side2)==(hypo*hypo));
					{
						System.out.println(side1 + " " + side2 + " " + hypo);
					}
				}
			}
		}