package study5ran2yl.study; public class deno14 { public static void main(String[] args) { //计算1+2+...+100 int x = 1; int sum = 0; while(x<=100) { sum+=x; x++; } System.out.println(sum); } }