Răspuns:
#include <iostream>
#define maxOreSapt 20
int main(){
int orepesapt = 0;
for(int i = 0; i < 7;++i) {
int y;
std::cout << "Ziua " << i+1 << ": ";
std::cin >> y;
orepesapt = orepesapt + y;
}
if(orepesapt > maxOreSapt) {
std::cout<<"Va fi pedepsit" ;
}else {
std::cout<<"Nu va fi pedepsit" ;}
std::cout << std::endl <<"S-a uitat " << orepesapt << " ore la TV";
return 0;
}