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



how can i add 2 numbers using delphi console application and also windows application , compare bo..

Answer / 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

More Delphi Interview Questions

How to Change the default width/height of the editor?

0 Answers  


'Interface mismatch. Engine version different' . what does this error indicates?

0 Answers  


How to Display a bitmap on the client area of an MDI parent form?

0 Answers  


How to Register a file extension and context menu operations?

0 Answers  


How to Perform undo on an edit control?

0 Answers  






What are the available Alternate security databases ?

0 Answers  


How to install BDE network ?

0 Answers  


How much disk space, memory, etc, do I need to run Delphi?

0 Answers  


How to move a string into a TMemoryStream or TFileStream?

0 Answers  


How to Use escape codes with the format() function ?

0 Answers  


How to stop IIS when you are writing web applications as ISAPI dll's?

0 Answers  


what are the different types of dBASE Unique style indexes ?

0 Answers  


Categories