package homework; |
public class ForSum { |
public static void main (String [] args) { |
int sum= 0 ; |
for ( int i= 1 ;i<= 100 ;i++) { |
sum+=i; |
} |
System.out.println( "1加到100的和是:" +sum); |
} |
} |
中级程序员
by: whoami 发表于:2019-12-22 17:47:54 顶(0) | 踩(0) 回复
牛批
回复评论