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 |
Explain ODBC Constraints ?
How to Remove drives listed in a TDriveComboBox ?
Where are the Delphi 4 InterBase Certificate Keys and IDs located?
How to Add a document to the Windows 95 Start Button's documents ?
How to Use the WinApi GetObject to get a bitmap?
How to get a list of CDROM drives on a computer?
How to enable the cut and copy operations for the TWebBrowser component in Delphi 5?
How to Use the Shell API function SHBrowseForFolder() ?
How to generate an error for SELECT statements that divide by zero?
Where can I get a copy of Delphi?
How do abstract classes differ from interfaces?
How to place a bitmap in a Metafile?