All pastes #900698 Raw Edit

Untitled

public text v1 · immutable
·published 2008-02-12 02:55 UTC
rendered paste body
public class addition 
{

	public static void main(String[] args) 
	{
		int i = 1;
		int round, shit = 1;
		int total = 0;
		while (i <= 9) {
			shit = (i - 1);
			System.out.print ("1");
			while ((shit + 1) >= 0) {
			
				System.out.print (" + " + (shit + 1));
				shit = shit - 1;
				total = total + shit;	
			}
			System.out.println(" = " + total);
			i = i + 1;
			total = 0;
			

		} // End while loop
	
	} // end main method
	
}	// end class