2018年7月21日

while控制语句实现从1到10的求和功能

摘要: 1 #include "stdafx.h" 2 3 #include<iostream> 4 using namespace std; 5 int main() 6 { 7 8 int sum = 0, n = 1; 9 10 while (n <= 10) { 11 sum = sum + n; 阅读全文

posted @ 2018-07-21 15:25 mengtianwxs 阅读(2062) 评论(0) 推荐(0)

导航