Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Solve the equation using the zero-factor property. x 2 100 = 0

Answered: 1 week ago