摘要:
#include using namespace std;const int MAXSIZE=100;int main(){int a[MAXSIZE];int sum=0;for(int i=0;i>a[i];if(a[i]==0)return 0; sum=sum+a[i];cout<<"sum= "<<sum;}system("pause");return 0;} 阅读全文
摘要:
#include using namespace std;int main(){int min,max;cout>min;cout>max;int sum=0;for(int i=min;i<=max;i++)sum+=i;cout<<"The sum from min to max: "<<sum<<endl;system("pause");return 0;} 阅读全文