Topic: If-else
Example-1:
Output:
Example-2:
Or even you can write as below:
Output:
Swicth-case:
Example:
Output:
Topic: Mathematical operators
Example:
Output:
The same operations you can do with subtraction, multiplication and division.
Exercise-2
Topic: Array
Example-1: String Array
Example-2:
Example-3: Integer Array
Example-4:
Topic: Lists
Example: String List
Or if you want to add more:
Example: Integer List
Topic: Loops
Example: “For” loop
Or in this way:
Or in this way:
Example: “Foreach” loop with string
Example : “Foreach” loop with integer
Example : “Foreach” loop with integer list
Example: “while” loop
Output:
Example: “do-while” loop
Output:
Переглядів: 183 |