From f5951671b9c5dbbf14b26b251108f896b536995a Mon Sep 17 00:00:00 2001 From: Sandy Brownlee Date: Wed, 21 Sep 2022 16:49:53 +0100 Subject: [PATCH] Added increment demo program --- programs/increment.tri | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 programs/increment.tri diff --git a/programs/increment.tri b/programs/increment.tri new file mode 100644 index 0000000..11358a5 --- /dev/null +++ b/programs/increment.tri @@ -0,0 +1,14 @@ +! this won't compile without implementing the bonus material in Practical 3 + +let + var a: Integer +in +begin + getint(var a); + a++; + putint(a); + puteol(); + a++; + putint(a); + puteol(); +end