Answered step by step
Verified Expert Solution
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started