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 |
Where can I get a copy of Delphi?
How to Send a message to all controls on a form 16-JUL-98?
What is the function of dynamic arrays?
How to set the desktop icon color in code, or make the text behind them transparent?
How to Limit the amount of text entered in a TEdit?
How to Map a DLL into another process ?
How to Set a form's maxwidth in code?
How to Get a handle on your files ?
How to Use additional data sets in expressions ?
What is the difference between Delphi and Delphi Client/Server?
How to Check for NULL in OnUpdateData handler ?
What databases can be used with dbExpress?