Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#include <bits/stdc++.h>
using namespace std;
int main()
{
int a, b, c, d, e, f;
int cont1 = 0, cont2 = 0;
cin >> a >> b >> c >> d >> e >> f;
if(a == 1 or b == 1 or c == 1) cont1++;
if(a == 2 or b == 2 or c == 2) cont1++;
if(a == 3 or b == 3 or c == 3) cont1++;
if(d == 1 or e == 1 or f == 1) cont2++;
if(d == 2 or e == 2 or f == 2) cont2++;
if(d == 3 or e == 3 or f == 3) cont2++;
if(cont1 >= cont2)
{
cout << "Restaurante da dona Joana\n";
if(cont1 == 3) cout << "Extremamente satisfeito\n";
else if(cont1 == 2) cout << "Satisfeito\n";
else if(cont1 == 1) cout << "A desejar\n";
else cout << "Decepcionado\n";
}
else
{
cout << "Self-Service do seu Joaquim\n";
if(cont2 == 3) cout << "Extremamente satisfeito\n";
else if(cont2 == 2) cout << "Satisfeito\n";
else if(cont2 == 1) cout << "A desejar\n";
else cout << "Decepcionado\n";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.