Java第一周作业
1.输出学号班级和姓名
package exe2; public class text { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("193230522计算机1905王城凯"); } }
2.输出以下图形
*
***
*****
***
*
package exe2; public class text2 { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println(" *"); System.out.println(" *** "); System.out.println("*****"); System.out.println(" *** "); System.out.println(" *"); } }
package exe2; public class text3 { public static void main(String[] args) { // TODO Auto-generated method stub int a=5; int b=8; System.out.println(a*a+b*b); } }