Question: Write a bash script that uses the while loop to perform the following: Ask the user to enter six integer numbers ( which may be

Write a bash script that uses the while loop to perform the following:
Ask the user to enter six integer numbers (which may be negative or non-negative). Separately compute the product of non-negative and negative numbers. Then, display the two results, as well as the count for each type.
Input/Output Example:
Enter int number 1:
4
Enter int number 2:
5
Enter int number 3:
-3
Enter int number 4:
9
Enter int number 5:
-7
Enter int number 6:
10
The count of non-negative numbers is: 4
The non-negative product result is: 1800
The count of negative numbers is: 2
The negative product result is: 21
Write a bash script that uses the while loop to

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!