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?
What does the error 'Token not found'?
I just bought Delphi. Where are the language and library reference manuals?
How to prevent the user from moving or sizing my form?
How to Disable system menu in code?
How to Remove drives listed in a TDriveComboBox ?
How to Run 16-bit Delphi on Windows NT4?
How to Typecaste a PChar to a longint?
How to make your main form fill up the Desk Top space?
How to tell if a form has been created (or any object)?
How to Handle exceptions in Delphi?
Is Turbo Pascal still available?