#include using namespace std; int main() { int uvegek[14] = { 5, 2, 5, 4, 3, 2, 4, 10, 5, 5, 3, 4, 3, 3 }; cout << "2. feladat" << endl; cout << "Mari néni lekvárja (dl): "; int L; cin >> L; cout << "3. feladat" << endl; int maxi = 0; int maxe = uvegek[maxi]; for (size_t i = 0; i < sizeof(uvegek)/sizeof(int); i++) if (uvegek[i]> maxe) { maxi = i; maxe = uvegek[maxi]; } cout << "A legnagyobb üveg " << maxe << " dl és " << maxi + 1 << ". a sorban" << endl; cout << "4. feladat" << endl; int s = 0; for (int ur : uvegek) s += ur; if (s > L) cout << "Elegendő üvg volt."; else cout<< "Maradt lekvár."; return 0; }