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 have ready before you call Borland Developer Support?

1880


Is there a programmatic way to add an alias to the IDAPI.CFG?

1952


what are Safe Mode and VGA mode?

1756


How do abstract classes differ from interfaces?

963


How to Connect via ODBC using Delphi or C++ Builder ?

1768


How do I close a modal form? For that matter, what is the best way to close any form?

972


How to Use Stored Procedures ?

1722


What to do if getting missing or corrupted file messages?

1878


What is the function of inheritance in delphi?

923


How to use sets in code, such as adding to TDBGrid.Options, at run time?

2435


How to add system menu items to a form ?

1819


How tough is it to learn Delphi?

1126


How to keep seconds from being included in the display when using TDateTimePicker?

1670


How to Close popup menu in system tray application ?

2041


How to prevent application?s main window from showing when application loads?

1782