(* Name:Chong Tsz Hang *)
(* Class: 4E ** No: 25 *)
(* Assignment #1 ** Q.2 *)
(* Variables : (money) be the amount of money ,
							(dollar5),(dollar1),(cent50),(cent10) be the coins *)
program money1;
uses crt;
var
	money: real;
	dollar5, dollar1, cent50, cent10: integer;
begin
	clrscr;
	write('Enter an amount of money: ');
	readln(money);
	dollar5:= trunc(money) div 5;
	dollar1:= (trunc(money) mod 5) div 1;
	cent50:=  (trunc(money * 10) mod 10) div 5;
	cent10:=  round(money * 10) mod 5;
	writeln('5-dollar coins: ',dollar5);
	writeln('1-dollar coins: ',dollar1);
	writeln('50-cent coins: ',cent50);
	writeln('10-cent coins: ',cent10)
end.
