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

Can we create stored procedures via Delphi or C++ Builder?

0 Answers  


What to have ready before you call Borland Developer Support?

0 Answers  


How do we get access to a database from Delphi?

0 Answers  


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

0 Answers  


How can one prevent a TForm from being moved or resized?

0 Answers  






How to Access Server Methods from Client ?

0 Answers  


How to have a TBitBtn component that has a word wrapped caption?

0 Answers  


How to Broadcast a message?

1 Answers  


How do abstract classes differ from interfaces?

0 Answers  


How to Initialize an array or record to null?

0 Answers  


'General SQL Error : Connection does not exist' in threaded application . what does this indicates?

0 Answers  


How to Trapp non client areas ?

0 Answers  


Categories