Using your favorite editor in linux write a script file and


Using your favorite editor in Linux, write a Script file and save it as myScript.sh that asked the users to input a number between 100 and 1000. Use the case statement to do the following:

1. If the number is an odd number then add all the even numbers in between 1 and the number using a for loop structure.

2. If the number is an even number then add all the odd numbers in between 1 and the number using a while loop structure.

3. If the number is divisible by 3 then add all the numbers in between 1 and the number using a until loop structure.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Using your favorite editor in linux write a script file and
Reference No:- TGS02248851

Now Priced at $15 (50% Discount)

Recommended (99%)

Rated (4.3/5)