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

Where can I get a copy of Delphi?

0 Answers  


What does the error 'Token not found'?

0 Answers  


I just bought Delphi. Where are the language and library reference manuals?

0 Answers  


How to prevent the user from moving or sizing my form?

0 Answers  


How to Disable system menu in code?

0 Answers  


How to Remove drives listed in a TDriveComboBox ?

0 Answers  


How to Run 16-bit Delphi on Windows NT4?

0 Answers  


How to Typecaste a PChar to a longint?

0 Answers  


How to make your main form fill up the Desk Top space?

0 Answers  


How to tell if a form has been created (or any object)?

0 Answers  


How to Handle exceptions in Delphi?

0 Answers  


Is Turbo Pascal still available?

0 Answers  


Categories