Código C++:
Ver original#include <iostream>
using namespace std;
int main (){
//50, 100, 200 y 500
int b50 = 0;
int b100 = 0;
int b200 = 0;
int b500 = 0;
int temp = 0;
int valor = 3350;
//cout << "diga el valor" << endl;
//cin >> valor;
cout << "$" << valor << endl;
//Para billetes de 500
if ( valor >= 500 ){
b500 = valor / 500;
temp = valor % 500;
valor = temp;
cout << "Billetes de 500: " << b500 << endl;
}
//Para billetes de 200
if ( valor >= 200 ){
b200 = valor / 200;
temp = valor % 200;
valor = temp;
cout << "Billetes de 200: " << b200 << endl;
}
//Para billetes de 100
if ( valor >= 100 ){
b100 = valor / 100;
temp = valor % 100;
valor = temp;
cout << "Billetes de 100: " << b100 << endl;
}
//Para billetes de 100
if ( valor >= 50 ){
b50 = valor / 50;
temp = valor % 50;
valor = temp;
cout << "Billetes de 50: " << b50 << endl;
}
cin.ignore();
return 0;
}
a ver si te sirve XD