-
Language
Pascal
-
Description
Sum of two numbers
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
program SumOfTwoNumbers;
uses crt;
var a, b, sum : real;
begin
write ('Enter the value of a: ');
readln (a);
write ('Enter the value of b: ');
readln (b);
sum := a+b;
writeln ('Value of sum: ', sum:0:6);
writeln;
write ('Press any key to finish . . . ');
readkey;
end.
uses crt;
var a, b, sum : real;
begin
write ('Enter the value of a: ');
readln (a);
write ('Enter the value of b: ');
readln (b);
sum := a+b;
writeln ('Value of sum: ', sum:0:6);
writeln;
write ('Press any key to finish . . . ');
readkey;
end.