Răspuns :
float n1, n2, n3, n4, n5, m;
cin>>n1>>n2>>n3>>n4>>n5;
m = (n1+n2+n3+n4+n5)/5;
if(n1<5 || n2<5 || n3<5 || n4<5 || n5<5 || m<6)
cout<<"Picat";
else
cout<<"Promovat";
cin>>n1>>n2>>n3>>n4>>n5;
m = (n1+n2+n3+n4+n5)/5;
if(n1<5 || n2<5 || n3<5 || n4<5 || n5<5 || m<6)
cout<<"Picat";
else
cout<<"Promovat";
#include <iostream>
using namespace std;
int main(){ float a, b, c, d, e;
cout<<"nota de la prima proba: "; cin>>a; cout<<"nota de la a doua proba: "; cin>>b; cout<<"nota de la a treia proba: "; cin>>c; cout<<"nota de la a patra proba: "; cin>>d; cout<<"nota de la a cincea proba: "; cin>>e;
if(a>0 && b>0 && c>0 && d>0 && e>0) if(a>=5 && b>=5 && c>=5 && d>=5 && e>=5 && (a+b+c+d+e)/5>=6) cout<<"elevul a promovat examenul"; else cout<<"elevul nu a promovat examenul"; else cout<<"notele nu sunt valide!";
return 0;}
using namespace std;
int main(){ float a, b, c, d, e;
cout<<"nota de la prima proba: "; cin>>a; cout<<"nota de la a doua proba: "; cin>>b; cout<<"nota de la a treia proba: "; cin>>c; cout<<"nota de la a patra proba: "; cin>>d; cout<<"nota de la a cincea proba: "; cin>>e;
if(a>0 && b>0 && c>0 && d>0 && e>0) if(a>=5 && b>=5 && c>=5 && d>=5 && e>=5 && (a+b+c+d+e)/5>=6) cout<<"elevul a promovat examenul"; else cout<<"elevul nu a promovat examenul"; else cout<<"notele nu sunt valide!";
return 0;}