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 |
Can we create stored procedures via Delphi or C++ Builder?
What to have ready before you call Borland Developer Support?
How do we get access to a database from Delphi?
How do I close a modal form? For that matter, what is the best way to close any form?
How can one prevent a TForm from being moved or resized?
How to Access Server Methods from Client ?
How to have a TBitBtn component that has a word wrapped caption?
How to Broadcast a message?
How do abstract classes differ from interfaces?
How to Initialize an array or record to null?
'General SQL Error : Connection does not exist' in threaded application . what does this indicates?
How to Trapp non client areas ?