日期:2014-05-20 浏览次数:20673 次
package test;
public class Test {
public static void sob(int start, int end) {
if (start == end + 1) {
for (int i = end; i > 0; i--) {
for (int j = 0; j < i; j++) {
System.out.print(" ");
}
System.out.println("This ALSO was written by call number " + i
+ ".");
}
} else {
for (int i = 0; i < start; i++)
System.out.print(" ");
System.out.println("This was written by call number " + start + ".");
start++;
sob(start, end);
}
}
public static void main(String[] args) {
Test.sob(1, 3);
}
}