End of Prac2

This commit is contained in:
simonkellet
2023-09-22 19:32:34 +01:00
parent 1a339eb900
commit 841a7c9af2
37 changed files with 222 additions and 27 deletions
BIN
View File
Binary file not shown.
+22
View File
@@ -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
View File
@@ -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
View File
@@ -1,5 +1,4 @@
let
proc putmany (n: Integer, c: Char) ~
let
var i: Integer