Write a program that calculates how many bills and what denomination you need to give to the cashier

Write a program that calculates how many bills and what denomination you need to give to the cashier in order to pay for the purchase in S rubles. It is known that the buyer has bills in denominations of 500 rubles, 100 rubles. and 50 rubles, and he begins to pay with the largest. (Programming language – Pascal)

program k_500_100_50;
var s: integer;

begin
write (‘Enter the amount in multiples of 50:’);
readln (s);
writeln ();
writeln (‘Bills of 500 rubles:’, s div 500: 4);
writeln (‘Bills of 100 rubles:’, (s mod 500) div 100: 4);
writeln (‘Bills of 50 p.:’, (s mod 100) div 50: 4)
end.



One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.