Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how can i add 2 numbers using delphi console application
and also windows application , compare both program ,
reply immediatly

Answer Posted / faizulla khan

program Project1;

{$APPTYPE CONSOLE}

uses
SysUtils;
var
f1, f2: integer;
s: string;


begin
{ TODO -oUser -cConsole Main : Insert code here }
try;
f1:=0;
f2:=0;
write('Enter first integer: ');
readln(f1);

write('Enter second integer: ');
readln(f2);
writeLn('The numbers add up to '+inttostr(f1+f2));
writeLn('Press enter to quit');

except
on E : Exception do
writeln(E.Classname+' '+e.message);

end;
readln;
end.

Is This Answer Correct ?    18 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What to use in Kylix, as a possible replacement for ShellExecute in Windows?

1990


what is Object Activation ?

1614


How to Use the Application's OnIdle Event?

2351


Where is TReport in Delphi 6?

1963


How to Use Multiple Servers?

1607


How to Use an animated cursor?

1727


How to move a string into a TMemoryStream or TFileStream?

1867


How to Check for NULL in OnUpdateData handler ?

1900


How to Simulate a mouse move in code?

1845


Can I use the AssignPrn method to write directly to a port?

2056


How to activate different hints for each cell in a grid?

1704


What are the Differences in the install paths for Kylix?

1853


How to detect if a given key was pressed during application during startup?

1581


Are there any tools to help me migrate my applications to Delphi?

797


How to Extract an icon from a .exe or .dll?

1659