I am currently studying pseudo code, and despite my 3 year history in programming, this 1 particular practice-exam question has me perplexed with its unconventional code (shown below):
Highlighted in Pink, are my 2 main problems with the code. I have experience across 3 languages, yet I have never encountered the control flow method <>
, and cannot imagine exactly what it would be used for. In addition to this, the variable average
appears in the code in the form of "average:6:2
", for which I am equally clueless.
To Summarise:
<>
is common for not equal
While number is not equal to 999
number:filed_width:precision
is pascal formatter for real number with filed_width
being the space for field and precision
is numer of digits after dot. so 3.141519:4:1
will print <space>3.1