编程语言
首页 > 编程语言> > java每日一练--day13

java每日一练--day13

作者:互联网

输入5进行拼接

import java.util.Scanner;

public class B1 {
public static void main(String args[]) {
Scanner s=new Scanner(System.in);
System.out.println(s.nextInt()+s.nextInt()+s.nextLine()+s.nextLine()+s.nextInt());
}

}

nextInt不读取回车,nextLine读取回车

 

标签:一练,java,Scanner,nextLine,--,System,nextInt,public
来源: https://www.cnblogs.com/2246781190zyc/p/16380303.html