好站連結:程式設計工藝大師
..作業一..
程式碼:
public class HelloWorld {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("Hello world!");
System.out.println("劉宜妮 9930083");
}
}
結果畫面:
..作業二..
程式碼:
public class HelloWorld {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("Hello world!");
System.out.println("劉宜妮 9930083");
System.out.println("九九乘法表:");
for (int i = 1; i <= 9; i++) {
for (int j = 1; j <= 9; j++) {
System.out.print(i + "*" + j + "=" + i * j + "\t");
}
System.out.println();
}
}
}
結果畫面:
文章標籤
全站熱搜
留言列表