2021 | OriginalPaper | Buchkapitel
The for and while Statements
verfasst von : Noel Kalicharan
Erschienen in: Julia - Bit by Bit
In this chapter, we will explain the following: How to use the while statement to perform ‘looping’ in a program How to find the gcd (also called hcf) of two numbers How to find the sum and average of an arbitrary set of numbers How to read data until there’s no more How to find the largest and smallest of an arbitrary set of numbers How to fetch (read) data from a file How to send (write) output to a file How to use the for statement to perform ‘looping’ in a program How to produce tables using for How to use break/continue in while/for statements Nested for statements