摘要: 遍历一遍,找连续的正数求和,同时比较求和的大小,最后输出最大的和就可以。 源代码: #include <iostream>#include<time.h>using namespace std;int maxSum(int*a,int n){ int sum=0; int b=0; for(int 阅读全文
posted @ 2018-10-14 18:15 博客呀 阅读(251) 评论(0) 推荐(0) 编辑