Given two integers, X and Y , identify whether X < Y or X > Y or X = Y.
Exactly one of the following lines:
- X is less than Y
- X is greater than Y
- X is equal to Y
read-rXread-rYif [[ X -lt Y ]]; thenechoXislessthanY; fiif [[ X -gt Y ]]; thenechoXisgreaterthanY; fiif [[ X -eq Y ]]; thenechoXisequaltoY; fi
Getting Started with Conditionals
Read in one character from STDIN. If the character is 'Y' or 'y' display "YES". If the character is 'N' or 'n' display "NO". No other character will be provided as input.
A mathematical expression containing +,-,*,^, / and parenthesis will be provided. Read in the expression, then evaluate it. Display the result rounded to decimal places.
read-rexpprintf%.3f $(echo"$exp"|bc-l)
Compute the Average
Given N integers, compute their average, rounded to three decimal places.
This challenge involves the construction of trees, in the form of ASCII Art.
We have to deal with real world constraints, so we cannot keep repeating the pattern infinitely. So, we will provide you a number of iterations, and you need to generate the ASCII version of the Fractal Tree for only those many iterations (or, levels of recursion).