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
How to launch a control panel applet?
Define PRIMARYLANGID(), SUBLANGID(), and MAKELANGID() macros?
What is the tag property useful for?
What if I do not have a CD-ROM drive?
'Translate error, value out of bounds' error what does these errors mean?
Why is there no "Save" button in the save dialog box?
'Cannot Load IDAPI Service Library' error. What does this error mean?
What is the history of Delphi?
What is the function of dynamic arrays?
How to Change RichEdit Font styles with HotKey combinations ?
How to Perform undo on an edit control?
How to Embede a page break in the Rich Edit control ?
How to detect if a non-menu key has been pressed?
Explain about Multi-Threaded ISAPI DLLs ?
'Insufficient memory for this operation' error . what does this error mean?