Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Bash shell script factor.sh that will do the following: 1) it prompts a user to enter an integer n from 10 to 100;

Write a Bash shell script factor.sh that will do the following: 1) it prompts a user to enter an integer n from 10 to 100; 2) Find the smallest (prime) factor for that number, so if the number is 21, it would output the message The smallest factor is 3. If the number was 77, it would output The smallest factor is 7. 3) If the number has no factors other than itself, it should output This number is prime.

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

More Books

Students also viewed these Databases questions

Question

=+3. What are vicarious reinforcement and vicarious punishment?

Answered: 1 week ago

Question

differentiate the function ( x + 1 ) / ( x ^ 3 + x - 6 )

Answered: 1 week ago

Question

4. Label problematic uses of language and their remedies

Answered: 1 week ago