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 Embede a copyright symbol in a string?
How to Obtain a list of available BDE language drivers?
How to Customize TTrackBar?
What should I give to Windows API functions that want a hWnd?
Does Delphi 5 include Resource Workshop and InstallShield Express?
How to Get a list of the available drives on a system?
Where is proxies.dcu?
MS SQL error '17824 Unable to write to ListenOn connection ' what does this error mean?
How to Use InvalidateRect()to repaint the entire form?
How to Select an item in a TListView when the checkbox is checked ?
Why the error "Operation must use an updateable query"?
How to avoid an access violation when using the move procedure?
How to Check drive ready status?
What you can contribute to the IBM?.
How to use the Find Error entry under the search heading of the menu bar?