啊哈添柴挑战Java1032. 区间和
作者:互联网
啊哈添柴——挑战
1032. 区间和
import java.util.Scanner;
/**
* @author yinglongwu
*/
//1032. 区间和
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int m= scanner.nextInt();
int n= scanner.nextInt();
int sum = 0;
for (int i = m; i <= n; i++) {
sum = sum + i;
}
System.out.println(sum);
scanner.close();
}
}
标签:scanner,添柴,int,nextInt,啊哈,1032,Java1032,public,Scanner 来源: https://blog.csdn.net/qq_43594119/article/details/104924572