The Purpose of this training is to get familiar with:
- Numbers and simple calculations
- For loops
- If statements
- Switch case statements
- Reading input from the user (console) and writing output back to the screen
- Create a program that gets a number as an input from the user and calculates the sum of all the numbers from 1 till the input number.
- Create a program that gets 2 numbers as an input from the user and a string as an action (“add”, “subtract”, “multiply”, “divide”) and prints the outcome of the relevant action.
- Create a program that gets a number as an input from the user and prints to the screen the factorial of the number, and weather this number is primary or not.
Note: These are calculation exercises – no need for fancy classes and objects– We’ll get to that later.