Untitled
public text v1 · immutablepublic 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