- Get name of user as user input and greet it. (
Hint
: use read and echo)
input
XYZ
output
Hello, XYZ
- Get two numbers from input, do addition and print its result (
Hint
: evaluate expression)
input
10 5
output
10 + 5 = 15
- Get any two numbers from input, do division and do rounding up to 2 decimal places
input
20 3
output
6.67
or
6.666
Explanation input
20
3
output
$ 6.67
or
$ 6.666
- Print All even numbers between 1 to 50 (
Hint
: use for loop)
output
2 4 6 . . . 50
- Get an input number from user and print sum of numbers from 0 to user input number (if user enters 20 then sum of first 20 numbers) (
Hint
: use for loop)
input
20
output
$ 210