问题标题: 酷町堂:4887 急!

0
0
已解决
张百川
张百川
新手光能
新手光能
#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main()
{
    int a,sum=0;
    do
    {
        cin>>a;
        if(a%2==0)
        {
            sum+=a;
        }
    }
    while(a!=0);
    cout<<a;
    return 0;
}

 


0
0
尤博扬
尤博扬
初级光能
初级光能

怎么能输出a呢?

cout<<sum;

应该这样,改一下,其他的不要改

AC100

我要回答