End of Prac2
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,22 @@
|
||||
let
|
||||
var a: Integer;
|
||||
var b: Integer
|
||||
in
|
||||
begin
|
||||
! Get user input for both values
|
||||
put('>'); put(' '); getint(var a);
|
||||
put('>'); put(' '); getint(var b);
|
||||
|
||||
! Sum
|
||||
putint(a+b);
|
||||
puteol();
|
||||
|
||||
! Prod.
|
||||
putint(a*b);
|
||||
puteol();
|
||||
|
||||
! Check if the same
|
||||
if a = b
|
||||
then begin put('S'); put('a'); put('m'); put('e'); put('!'); end
|
||||
else !nothing
|
||||
end
|
||||
Binary file not shown.
+1
-1
@@ -7,7 +7,7 @@ let
|
||||
|
||||
var me: Name;
|
||||
var silly : maxint;
|
||||
var silly: Rec;
|
||||
! var silly: Rec; ! [PRAC2:5] Fixed error about "silly"
|
||||
|
||||
proc putstr (s: String) ~
|
||||
let var i: Integer
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,4 @@
|
||||
let
|
||||
|
||||
proc putmany (n: Integer, c: Char) ~
|
||||
let
|
||||
var i: Integer
|
||||
|
||||
Reference in New Issue
Block a user