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

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

0 Answers  


How to Display 4 digit years in Delphi applications?

1 Answers  


How to Print Delphi controls using QuickReports?

0 Answers  


Where can we obtain the help file for the VtChart component?

0 Answers  


"EOleSysError : Error loading type library/DLL" . what does this error mean?

0 Answers  


How to Initialize an array or record to null?

0 Answers  


How to Determine if a given printer is capable of printing a PostScript file?

0 Answers  


How to Print a TStringGrid / TDBGrid?

0 Answers  


what are the uses of Arrow and Function Keys ?

0 Answers  


How do we get access to a database from Delphi?

0 Answers  


Do the ADO components come with the professional version of Delphi 6?

1 Answers  


Compare the similarities and differences among Sockets, DCOM, OLE Enterprise?

0 Answers  


Categories