Advertisement
pjobro

trener ???

Mar 12th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int polje[3][3],igrac[3];
  6.  
  7. int main()
  8. {
  9. for (int i=0;i<3;i++){
  10. for (int j=0;j<3;j++){
  11. cin>>polje[i][j];
  12. if(polje[i][j]==1){
  13. igrac[i]+=4;
  14. }else if(polje[i][j]==2){
  15. igrac[i]+=6;
  16. }else if(polje[i][j]==3){
  17. igrac[i]+=8;
  18. }else if(polje[i][j]==4){
  19. igrac[i]+=10;
  20. }
  21. }
  22. }
  23.  
  24.  
  25. if (igrac[0]>=igrac[1] && igrac[0]>=igrac[2]){
  26. cout<<"LIN "<<igrac[0]<<endl;
  27. }
  28. if (igrac[1]>=igrac[0] && igrac[1]>=igrac[2]){
  29. cout<<"FENG "<<igrac[1]<<endl;
  30. }
  31.  
  32. if (igrac[2]>=igrac[1] && igrac[2]>=igrac[0]){
  33. cout<<"TAO "<<igrac[2]<<endl;
  34. }
  35.  
  36.  
  37.  
  38. return 0;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement