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 Remove drives listed in a TDriveComboBox ?

0 Answers  


How to Detect what direction a printer will rotate for a portrait ?

0 Answers  


How to Show two forms allowing the first to retain focus ?

0 Answers  


How to Load a TListView component that contains SubItems?

0 Answers  


How to Display 4 digit years in Delphi applications?

1 Answers  






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

0 Answers  


What are the different types of pointers used in delphi?

0 Answers  


How to Drop a combobox's list in code?

0 Answers  


How to capture the URL and title of the current webpage being viewed?

0 Answers  


How to Migrate a project from Delphi 1 or 2 to Delphi 3 ?

0 Answers  


How to Use Stored Procedures ?

0 Answers  


How to Determine minor version number?

0 Answers   Infosys,


Categories