My first kick-ass program on delphi

c, c++, php, html, sql ..etc discussion. also includes codes and source codes.

My first kick-ass program on delphi

Postby Ritterkreuzträger » Tue May 25, 2010 10:31 am

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.
Ritterkreuzträger
Allie
Allie
 
Posts: 105
Joined: Tue Jan 12, 2010 2:59 pm

Re: My first kick-ass program on delphi

Postby Sethioz » Tue May 25, 2010 1:17 pm

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.
User avatar
Sethioz
Admin
Admin
 
Posts: 4757
Joined: Fri Jul 27, 2007 5:11 pm
Location: unknown

Re: My first kick-ass program on delphi

Postby Ritterkreuzträger » Tue May 25, 2010 2:36 pm

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.
Ritterkreuzträger
Allie
Allie
 
Posts: 105
Joined: Tue Jan 12, 2010 2:59 pm

Re: My first kick-ass program on delphi

Postby Sethioz » Tue May 25, 2010 4:41 pm

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.
User avatar
Sethioz
Admin
Admin
 
Posts: 4757
Joined: Fri Jul 27, 2007 5:11 pm
Location: unknown

Re: My first kick-ass program on delphi

Postby Ritterkreuzträger » Tue May 25, 2010 4:46 pm

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.
Ritterkreuzträger
Allie
Allie
 
Posts: 105
Joined: Tue Jan 12, 2010 2:59 pm

Re: My first kick-ass program on delphi

Postby Sethioz » Tue May 25, 2010 4:50 pm

just some details about tools, not about delphi itself, but not here plz, let this remain topic about your program.
User avatar
Sethioz
Admin
Admin
 
Posts: 4757
Joined: Fri Jul 27, 2007 5:11 pm
Location: unknown


Return to Programming / Coding / Debugging

Who is online

Users browsing this forum: No registered users and 4 guests