首页 > 代码库 > 刑警的射击成绩

刑警的射击成绩

#include <iostream>using namespace std;int main( ){    int i,a,b,c,d;    a=b=c=d=0;    do    {        cin>>i;        switch (i)        {        case 0:        case 1:        case 2:        case 3:        case 4:            d++;            break;        case 5:        case 6:            c++;            break;        case 7:        case 8:            b++;            break;        case 9:        case 10:            a++;            break;        }    }    while (i<=10);    cout<<"A:"<<a<<endl;    cout<<"B:"<<b<<endl;    cout<<"C:"<<c<<endl;    cout<<"D:"<<d<<endl;    return 0;}

刑警的射击成绩