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 file attributes programmatically?
How to change a specific IDAPI configuration setting?
What version of Delphi 5 does the Code Explorer come with?
How to have a TBitBtn component that has a word wrapped caption?
How do I close a modal form? For that matter, what is the best way to close any form?
'Insufficient memory to complete operation' error . what does this indicates?
What to use in Kylix, as a possible replacement for ShellExecute in Windows?
what are the different types of dBASE Unique style indexes ?
How to Add TrueType fonts to windows in code?
How to Retrieve a users login name ?
Is there any way to record a keyboard macro in the IDE?
How to use the Find Error entry under the search heading of the menu bar?