pumpkin-

导航

1903021137—赵舞艳—Java第二周作业—运行和插入代码练习

 

项目 内容
课程班级博客链接 19级信计班(本)
这个作业要求链接 Java第二周作业
博客名称 1903021137-赵舞艳-Java第二周作业-运行和插入代码练习
要求 每道题要有题目,代码,截图

 

 题目一:
image
 代码:

 public class a {
      public static void main(String[] args) {
     System.out.println(" * ");
     System.out.println(" *** ");
     System.out.println("*****");
     System.out.println(" *** ");
     System.out.println(" * ");
 }
 }

 截 图: 

 题目二:

定义两个整型变量 a=5 , b=8, 求平方和并输出

代码:

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

 截图:

 

 

 

posted on 2022-03-13 21:54  pumpkin-  阅读(18)  评论(0编辑  收藏  举报