Page 1 of 1

My first kick-ass program on delphi

Posted: Tue May 25, 2010 10:31 am
by Ritterkreuzträger

Code: Select all

program EpicCalc;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var
N1, N2, sum: Integer;
Type
NRange = 0..50;
begin
repeat
Write('Number1 (+)');
ReadLn(n1);
Write('Number2 (+)');
ReadLn(n2);
sum:= n1 + n2;
if sum = 11 then Write('Also, Sum is 11  ');
WriteLn('Result:', Sum);
Write('Random Number:', NRange(random(45684664235261)));
until false ;
end.
It is can calculate 2 numbers(+) and if result is 11 it is writing 'Also, Sum is 11' which is KICK-ASS too. Ive forgot about main feature of this genius project - after calculating it even writing down random number in range 0-50!! I am a superior leader.

Re: My first kick-ass program on delphi

Posted: Tue May 25, 2010 1:17 pm
by Sethioz
kind a confused, what exactly this program does ? like a calculator ?
i don't like delphi myself, never tried. C and Java are more confortable for me.

Re: My first kick-ass program on delphi

Posted: Tue May 25, 2010 2:36 pm
by Ritterkreuzträger
I was not serious when i told "it is kick-ass". Yes calculator, but when i made it ive added few "junk" codes just for purpose to see, can i understand Delphi well or not, like writing another stuff if sum = 11.
Ive never tried to study C-langs, this codes looks very ugly, not the way you write in stuff, this damn {,}'() signs.
By the way, Delphi applications should work in any systems(32\64 bits, *nix i think) because they are not need additional "drivers" like C++ Runtime framework, .NET and so on; everything what needs can be putted to program into "uses" section. Well, also Delphi applications a little bit bigger than C* ones.

Re: My first kick-ass program on delphi

Posted: Tue May 25, 2010 4:41 pm
by Sethioz
how about a new thread, about delphi. im kind a interested of, what tools you are using to compile and such. it seems easier and more user friendly than C.

and yeah, i got it, it was a joke about kick-ass, but its not easy to write a program, even this one. 99% of computer users have no clue where to even start.

Re: My first kick-ass program on delphi

Posted: Tue May 25, 2010 4:46 pm
by Ritterkreuzträger
Thread? What shall i write in? Im not enough good in Delphi to teach it someone lol.
Im using CodeGear 2010(aka RAD Studio) and sometimes Borland Delphi 7.

Re: My first kick-ass program on delphi

Posted: Tue May 25, 2010 4:50 pm
by Sethioz
just some details about tools, not about delphi itself, but not here plz, let this remain topic about your program.