题目: 写一个函数,接受一个整数n,输出1+2+3+…+n的和 import java.util.Scanner; public class TestSum1 { public static void main(String[] args) { Scanner sc =