Estanislau Frade 0 Posted September 22, 2020 Report Share Posted September 22, 2020 Tenho a rotina abaixo e não consigo fechar a mesma, podemos auxiliar ? #include <iostream> using namespace std; int main() { int NOTA1, NOTA2; double MEDIA; cout<<"DIGITE A PRIMEIRA NOTA"; cin >> NOTA1; cout << "DIGITE A SEGUNDA NOTA"; cin >> NOTA2; MEDIA = (NOTA1 / NOTA2)/2; if ((MEDIA<=0.0) && (MEDIA<=4.0)); { cout << "ALUNO REPROVADO!"; } else if ((MEDIA>=4.0) && (MEDIA<=6.0)); { cout <<"ALUNO DE RECUPERACAO!"; } else if ((MEDIA >=7.0) && (MEDIA<=8.0)); { cout << "ALUNO APROVADO"; } else return 0; } Quote Link to post Share on other sites
0 srjamaica 0 Posted October 25, 2020 Report Share Posted October 25, 2020 Fiz a correçao do erros e so dar uma comparada no seu q você encontrara o erro ok #include <iostream> using namespace std; int main() { int NOTA1, NOTA2; double MEDIA; cout<<"DIGITE A PRIMEIRA NOTA: "; cin >> NOTA1; cout << "DIGITE A SEGUNDA NOTA: "; cin >> NOTA2; MEDIA = (NOTA1 + NOTA2)/2; if ((MEDIA<=0.0) && (MEDIA<=4.0)) { cout << "ALUNO REPROVADO!"; } else if((MEDIA>=4.0) && (MEDIA<=6.0)) { cout <<"ALUNO DE RECUPERACAO!"; } else { cout << "ALUNO APROVADO"; } return 0; } Quote Link to post Share on other sites
Question
Estanislau Frade 0
Tenho a rotina abaixo e não consigo fechar a mesma, podemos auxiliar ?
int NOTA1, NOTA2;
double MEDIA;
cin >> NOTA1;
cin >> NOTA2;
{
cout << "ALUNO REPROVADO!";
}
else if ((MEDIA>=4.0) && (MEDIA<=6.0));
{
cout <<"ALUNO DE RECUPERACAO!";
}
else if ((MEDIA >=7.0) && (MEDIA<=8.0));
{
cout << "ALUNO APROVADO";
}
else
return 0;
}
Link to post
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.