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 Change the default width/height of the editor?
'Interface mismatch. Engine version different' . what does this error indicates?
How to Display a bitmap on the client area of an MDI parent form?
How to Register a file extension and context menu operations?
How to Perform undo on an edit control?
What are the available Alternate security databases ?
How to install BDE network ?
How much disk space, memory, etc, do I need to run Delphi?
How to move a string into a TMemoryStream or TFileStream?
How to Use escape codes with the format() function ?
How to stop IIS when you are writing web applications as ISAPI dll's?
what are the different types of dBASE Unique style indexes ?