how can i add 2 numbers using delphi console application
and also windows application , compare both program ,
reply immediatly
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 |
How to Remove drives listed in a TDriveComboBox ?
How to Detect what direction a printer will rotate for a portrait ?
How to Show two forms allowing the first to retain focus ?
How to Load a TListView component that contains SubItems?
How to Display 4 digit years in Delphi applications?
'Interface mismatch. Engine version different' . what does this error indicates?
What are the different types of pointers used in delphi?
How to Drop a combobox's list in code?
How to capture the URL and title of the current webpage being viewed?
How to Migrate a project from Delphi 1 or 2 to Delphi 3 ?
How to Use Stored Procedures ?
How to Determine minor version number?