//从1+到x.
/*
import java.util.Scanner;//调包(其实我不懂)
class A//创建类名为A的类;
{
public static void main(String[] args)
{
System.out.println("运行几次?");
Scanner sc = new Scanner(System.in);
int d = sc.nextInt();
int sum = 0;int b = 0;
for(int c = 1;c <= d;c++)
{
System.out.println("从1加到x,请输入x");
int i = sc.nextInt();
for (int j = i;b <= j ;b++ )
{
sum += b;
}
System.out.println(sum);
}
}
}
*/ |
|