how can i add 2 numbers using delphi console application
and also windows application , compare both program ,
reply immediatly
Answer Posted / 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 View All Answers
What to use in Kylix, as a possible replacement for ShellExecute in Windows?
what is Object Activation ?
How to Use the Application's OnIdle Event?
Where is TReport in Delphi 6?
How to Use Multiple Servers?
How to Use an animated cursor?
How to move a string into a TMemoryStream or TFileStream?
How to Check for NULL in OnUpdateData handler ?
How to Simulate a mouse move in code?
Can I use the AssignPrn method to write directly to a port?
How to activate different hints for each cell in a grid?
What are the Differences in the install paths for Kylix?
How to detect if a given key was pressed during application during startup?
Are there any tools to help me migrate my applications to Delphi?
How to Extract an icon from a .exe or .dll?