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读取回车

 

posted @ 2022-06-15 23:20  开源遗迹  阅读(17)  评论(0)    收藏  举报