Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int polje[3][3],igrac[3];
- int main()
- {
- for (int i=0;i<3;i++){
- for (int j=0;j<3;j++){
- cin>>polje[i][j];
- if(polje[i][j]==1){
- igrac[i]+=4;
- }else if(polje[i][j]==2){
- igrac[i]+=6;
- }else if(polje[i][j]==3){
- igrac[i]+=8;
- }else if(polje[i][j]==4){
- igrac[i]+=10;
- }
- }
- }
- if (igrac[0]>=igrac[1] && igrac[0]>=igrac[2]){
- cout<<"LIN "<<igrac[0]<<endl;
- }
- if (igrac[1]>=igrac[0] && igrac[1]>=igrac[2]){
- cout<<"FENG "<<igrac[1]<<endl;
- }
- if (igrac[2]>=igrac[1] && igrac[2]>=igrac[0]){
- cout<<"TAO "<<igrac[2]<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement