int sum = 0;int m = 1;int n = 100;int s = m;// 使用while计算M+...+N:while (s<=n) { sum += s; s++;}System.out.println(sum);
Sign in to make a reply
I WILL.