When you learn how to program, a big question is: how do you structure the program in the best way? There are a lot of approaches for this, but to get started, this one works pretty well: Input-Process-Output.
With this approach, the program has three phases: Input, Process and Output.
In the input phase, the program accepts user input. This can either happen through command line arguments or direct user input.
During Process, the user input is used to calculate a result. Now, this can involve math, but it doesn’t have to. For instance, your program could read / write a file.
The last phase outputs the results that got calculated in the previous step. After this is complete, the program ends.
Have you used this before? Share your story below in the comments!