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 make sure the function DLLPROC is called when your DLL is unloaded?
'Interface not supported' . what does this error mean?
How to get the coding for : Well-ordered numbers
How to Display the selected row of a DBGrid in a different color?
Specify a DefaultExpression for a TField object?
How to Dynamically drawing a transparent image ?
How to Print a WEB page with the HTML control?
How to Create a delay without a timer?
How to install BDE network ?
How to Change the font in a hint window ?
Explain the MasterSource/MasterFields behavior?
What operating systems does Delphi support?