|
|
back to boardwhy compilation error? #include<iostream> #include<string.h> #include<stdio.h> using namespace std; int main() {string z[10000],str,a1="Emperor",a2="Little", a3="Macaroni"; int n,i,j,k,a=0,b=0,c=0; cin>>n; for(i=0;i<n;i++) {cin>>z[i]>>str; if(z[0]==a1)a++; if(z[0]==a2)b++; if(z[0]==a3)c++; } if(a>b&&a>c){cout<<"Emperor Penguins";} else if(b>a&&b>c){cout<<"Little Penguins";} else cout<<"Macaroni Penguins"; return 0; } |
|
|