0
The problem is the following 2 football teams, wanted to create a decision where it would show "Brazil won" or "Argentina won" or "There was a draw".
But I can not create three decisions, follows below my code.
#include<iostream>
using namespace std;
int main(){
int a, b;
cout<<"Digite quantos Gol(s) o Brasil fez: ";
cin>>b;
cout<<"Digite quantos Gol(s) a Argentina fez: ";
cin>>a;
if (b>a){
cout<<"\nBrasil ganhou com "<<b<<"Gol(s)\n";
/*if (b==a){
cout<<"Brasil e Argentina empatou, ambos com "<<a<<"Gol(s)";
}*/
}
else (a==b)
cout<<"Houve empate. "<<a<<"Gol(s)";
else
cout<<"\nArgetina ganhou com "<<a<<"Gol(s)\n";
return 0;
}
Did any of the answers solve your problem? Do you think you can accept one of them? If you haven’t already, see [tour] how to proceed. You would help the community by identifying the best solution for you. You can accept only one of them, but you can vote for any question or answer you find useful on the entire site.
– Maniero