Fahad/MCG-CS/Code/While.kcl
author Chengsong
Tue, 23 Aug 2022 22:59:49 +0100
changeset 584 1734bd5975a3
parent 45 7545b1bc1514
permissions -rw-r--r--
chap4 nub
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
45
7545b1bc1514 msc project
Fahad Ausaf <fahad.ausaf@kcl.ac.uk>
parents:
diff changeset
     1
var FirstNum = 10;
7545b1bc1514 msc project
Fahad Ausaf <fahad.ausaf@kcl.ac.uk>
parents:
diff changeset
     2
var SecondNum = 5;
7545b1bc1514 msc project
Fahad Ausaf <fahad.ausaf@kcl.ac.uk>
parents:
diff changeset
     3
7545b1bc1514 msc project
Fahad Ausaf <fahad.ausaf@kcl.ac.uk>
parents:
diff changeset
     4
while FirstNum > SecondNum do
7545b1bc1514 msc project
Fahad Ausaf <fahad.ausaf@kcl.ac.uk>
parents:
diff changeset
     5
	print FirstNum;
7545b1bc1514 msc project
Fahad Ausaf <fahad.ausaf@kcl.ac.uk>
parents:
diff changeset
     6
7545b1bc1514 msc project
Fahad Ausaf <fahad.ausaf@kcl.ac.uk>
parents:
diff changeset
     7
	FirstNum = FirstNum - 1;
7545b1bc1514 msc project
Fahad Ausaf <fahad.ausaf@kcl.ac.uk>
parents:
diff changeset
     8
endwhile;
7545b1bc1514 msc project
Fahad Ausaf <fahad.ausaf@kcl.ac.uk>
parents:
diff changeset
     9
7545b1bc1514 msc project
Fahad Ausaf <fahad.ausaf@kcl.ac.uk>
parents:
diff changeset
    10
print "Enter any number to continue";
7545b1bc1514 msc project
Fahad Ausaf <fahad.ausaf@kcl.ac.uk>
parents:
diff changeset
    11
read SecondNum;