Odpowiedź :
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
int tab[] = {200, 100, 50, 20, 10, 5, 2, 1};
int reszta, n, i=0;
cout << "Podaj reszte";
cin >> reszta;
while (reszta > 0)
{
if (reszta >= tab[i])
{
n = reszta / tab[i];
reszta = reszta - (tab[i] * n);
cout << tab[i] << ": " << n << endl;
}
i++;
}
return 0;
}