#include <iostream>
#include <iomanip>
using namespace std;
const int WEEKS_IN_MONTH = 4 ;
int main( ) {
double weeklyEarnings[ WEEKS_IN_MONTH] ;
double totalEarnings = 0 ;
// Citire veniturile săptămânale
for ( int i = 0 ; i < WEEKS_IN_MONTH; ++ i) {
cout << "Introduceti venitul pentru saptamana " << ( i + 1 ) << ": " ;
cin >> weeklyEarnings[ i] ;
totalEarnings + = weeklyEarnings[ i] ;
}
// Afișarea sumei totale a veniturilor pentru o lună
cout << fixed << setprecision( 3 ) << "Suma totala a veniturilor pentru o luna: " << totalEarnings << endl;
return 0 ;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8aW9tYW5pcD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmNvbnN0IGludCBXRUVLU19JTl9NT05USCA9IDQ7CgppbnQgbWFpbigpIHsKICAgIGRvdWJsZSB3ZWVrbHlFYXJuaW5nc1tXRUVLU19JTl9NT05USF07CiAgICBkb3VibGUgdG90YWxFYXJuaW5ncyA9IDA7CgogICAgLy8gQ2l0aXJlIHZlbml0dXJpbGUgc8SDcHTEg23Dom5hbGUKICAgIGZvciAoaW50IGkgPSAwOyBpIDwgV0VFS1NfSU5fTU9OVEg7ICsraSkgewogICAgICAgIGNvdXQgPDwgIkludHJvZHVjZXRpIHZlbml0dWwgcGVudHJ1IHNhcHRhbWFuYSAiIDw8IChpICsgMSkgPDwgIjogIjsKICAgICAgICBjaW4gPj4gd2Vla2x5RWFybmluZ3NbaV07CiAgICAgICAgdG90YWxFYXJuaW5ncyArPSB3ZWVrbHlFYXJuaW5nc1tpXTsKICAgIH0KCiAgICAvLyBBZmnImWFyZWEgc3VtZWkgdG90YWxlIGEgdmVuaXR1cmlsb3IgcGVudHJ1IG8gbHVuxIMKICAgIGNvdXQgPDwgZml4ZWQgPDwgc2V0cHJlY2lzaW9uKDMpIDw8ICJTdW1hIHRvdGFsYSBhIHZlbml0dXJpbG9yIHBlbnRydSBvIGx1bmE6ICIgPDwgdG90YWxFYXJuaW5ncyA8PCBlbmRsOwoKICAgIHJldHVybiAwOwp9Cg==