第一次作业
1,输出学号班级和姓名
package javawork; public class java { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("193230133计算机1901易仕川"); } }
2,输出以下图形
*
***
*****
***
*
package javawork; public class java { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println(" *\n"+" ***\n"+"*****\n"+" ***\n"+" *\n"); } }
3定义两个整型变量a=5 b=8 求平方和并输出
package javawork; public class java { public static void main(String[] args) { int a=5; int b=8; System.out.println(a*a+b*b); } }