#include using namespace std; int main() { int S, t1, t2, t3, nt1=0, nt2=0, nt3=0 ; cout << "Introduceti suma de bani, urmata de valorile celor trei monede" << endl; cin >> S >> t1 >> t2 >> t3 ; while ( S >= t1 ) { S = S-t1 ; nt1++ ; } while ( S >= t2 ) { S = S-t2 ; nt2++ ; } while ( S >= t3 ) { S = S-t3 ; nt3++ ; } cout << endl << nt1 << " monede de " << t1 << endl; cout << endl << nt2 << " monede de " << t2 << endl; cout << endl << nt3 << " monede de " << t3 << endl; return 0; }