Jump to content


Check out our Community Blogs

CrazedDoc

Member Since 13 Sep 2008
Offline Last Active Sep 13 2008 10:26 AM
-----

Topics I've Started

A couple of questions

13 September 2008 - 10:26 AM

I have started on delphi this week at college and it is my first language, basically I have made a couple of simple consoles, but I was wondering how to program an interface for a console so it isnt just a black box.

This is the most complicated thing I have done so far:

program Project1;

{$APPTYPE CONSOLE}

uses
SysUtils;
var
amount, twenty, twentyrem, ten, tenrem, five, fiverem, two, tworem, one : Integer;
begin
writeln ('Please enter the amount of money and then press enter:');
writeln ('');
readln (amount);
twenty := amount DIV 20;
twentyrem := amount MOD 20;
ten := twentyrem DIV 10;
tenrem := twentyrem MOD 10;
five := tenrem DIV 5;
fiverem := tenrem MOD 5;
two := fiverem DIV 2;
tworem := fiverem MOD 2;
one := tworem DIV 1;
writeln ('');
writeln ('20 notes needed:', ' ', twenty);
writeln ('');
writeln ('10 notes needed:', ' ', ten);
writeln ('');
writeln ('5 notes needed:', ' ', five);
writeln ('');
writeln ('2 coins needed:', ' ', two);
writeln ('');
writeln ('1 coins needed', ' ', one);
writeln ('');
readln;
end.

Just a program that allows the user to enter a amount of money and then it counts out how many notes they need (money). I want to make a interface for it so that it isnt just a console black box. How do I do this? I am using delphi 2007.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download