Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using your favorite editor, write a Script file and save it as myScript.sh that asked the users to input a number between 100 and 1000.

Using your favorite editor, 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

Recommended Textbook for

Postgresql 16 Administration Cookbook Solve Real World Database Administration Challenges With 180+ Practical Recipes And Best Practices

Authors: Gianni Ciolli ,Boriss Mejias ,Jimmy Angelakos ,Vibhor Kumar ,Simon Riggs

1st Edition

1835460585, 978-1835460580

More Books

Students also viewed these Databases questions

Question

Find the derivative of the function s - 3 f(9)= S + 7 f (s) = (Ill

Answered: 1 week ago

Question

Distinguish between hearing and listening.

Answered: 1 week ago

Question

Use your voice effectively.

Answered: 1 week ago