7.3
键盘录入及录入求和:
import java.util.Scanner;
public class Test{
public static void main(String[]args)
{
Scanner sc=new Scanner(System.in);
System.out.println("请输入第一个数字");
int i1=sc.nextInt();
System.out.println("请输入第二个数字");
int i2=sc.nextInt();
System.out.println("输出和为");
System.out.println(i1+i2);
}
}
标签:Java,Scanner,System,sc,第二周,暑假,println,out From: https://www.cnblogs.com/genyuan0/p/17523861.html