Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int x = 0, V, I, J, K, L;
- cin >> V;
- while(V != 0)
- {
- if(V < 50)
- {
- I = 0;
- goto dez;
- }
- I = (V - (V%50)) / 50;
- V = V%50;
- dez:
- if(V < 10)
- {
- J = 0;
- goto cinco;
- }
- J = (V - (V%10)) / 10;
- V = V%10;
- cinco:
- if((V%10) < 5)
- {
- K = 0;
- goto um;
- }
- K = (V - (V%5)) / 5;
- V = V%5;
- um:
- L = V;
- x++;
- cout << "Teste" << x << "\n";
- cout << I << " "<< J << " " << K << " " << L << "\n";
- cout << endl;
- cin >> V;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement