Facebook
From Gentle Pudu, 2 Months ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 28
  1. #include<iostream>
  2. using namespace std;int main(){int n,e=0,k=0,h=0,m=0,o=0;cin>>n;for(int i=0;i<n;++i){int a;cin>>a;if(a==1)e++;if(a==2)k++;if(a==3)h++;if(a==4)m++;if(a==5)o++;}cout<<e<<' '<<k<<' '<<h<<' '<<m<<' '<<o;}
  3.