No older revisions available
No older revisions available
~cpp
#include<iostream.h>
//#include<stdlib.h>
void main()
{
int i,j;
int t[10];
int a=0,b=0,c=0,d=0,f=0;
j=0;
do
{
cin>>t[j];
j++;
}while(t[j-1]!=999);
for(i=0;i<j;i++)
{
switch(t[i]/10){
case 10:
a++;
break;
case 9:
a++;
break;
case 8:
b++;
break;
case 7:
c++;
break;
case 6:
d++;
break;
default :
if(999==t[i])
break;
else
f++;
break;
}
}
cout<<"A가 "<<a<<"개 ";
cout<<"B가 "<<b<<"개 ";
cout<<"C가 "<<c<<"개 ";
cout<<"D가 "<<d<<"개 ";
cout<<"F가 "<<f<<"개 ";
//system("pause");
}