魔幻的猫头鹰

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

1.package testhomework;

public class homework {
public static void main(String[] args) {
System.out.println("193230118"+"计算机1901"+"齐泽浩");
}
}
2.package testhomework;

public class homework2 {
public static void main(String[] args) {
int size=3;
for (int i = 1; i <= size; i++) {
for (int j = 1; j <= size - i; j++) {
System.out.print(" ");
}

for (int k = 1; k <= 2 * i - 1; k++) {
System.out.print('*');
}
System.out.println();
}
for (int i = 1; i <= size-1; i++) {
for (int j = 1; j <= i; j++){
System.out.print(" ");
}

for (int k = 2*size-3; k >= 2 * i - 1; k--){
System.out.print('*');
}
System.out.println();
}
}
}
3.package testhomework;

public class homework3 {
public static void main(String[] args) {
int a = 5,b = 8,c = 0;
c = a*a+b*b;
System.out.println(c);

}
}

3.

posted on 2021-03-08 10:17  魔幻的猫头鹰  阅读(21)  评论(0编辑  收藏  举报