Program DOI_TIEN;
Uses Crt;
Var x,y,z,n,i,j,h,s:longint;
Begin
Clrscr;
Writeln('CHUONG TRINH DOI TIEN:');
Writeln('-----------------------------');
Write('Nhap so tien can doi n = ');readln(n);
Write('Nhap loai tien thu 1: ');readln(x);
Write('Nhap loai tien thu 2: ');readln(y);
Write('Nhap loai tien thu 3: ');readln(z);
Writeln('Loai ',x:6,' Loai ',y:6,' Loai ',z:6);
For i:=0 to (n div x) do
For j:=0 to (n div y) do
For h:= 0 to (n div z) do
If (i*x+j*y+h*z=n) then
Writeln (i:8,j:12,h:10);
Readln;
End.
Ý kiến bạn đọc
Những tin cũ hơn