Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

how do I write a MIPS program that asks user how many positive number that is devisable by you want to add? .Then your loop

how do I write a MIPS program that asks user how many positive number that is devisable by you want to add? .Then your loop counter would be the user input. If the user enters a positive number between 1 and 100 that is devisable by 6, you increment your loop counter and add it to the sum.. You need to decide if the positive number entered by the user is divisible by 6 or not. Your program should print an error message if the number is not within the range and ask user for another number

Like this:

How many positive number that is devisable by you want to add? 3

Enter a number: 36 ==> 36 is divisible by 6

Enter a number: -20 ==> **** ERROR: -20 is not a positive number

. Enter another number. Enter a number: 0 ==> **** ERROR: 0 is not in the range of 1 to 100.

Enter another number. Enter a number: 21 ==> 21 is not divisible by 6

. Enter another number. Enter a number: 121 **** ERROR: 121 is not in the range of 1 to 100. Enter another number.

Enter a number: 6 ==> 6 is divisible by 6

Enter a number: 12 ==> 12 is divisible by 6

The Sum of the positive numbers between 1 and 100 that are devisable by 6, is: 54

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_2

Step: 3

blur-text-image_3

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

Database Reliability Engineering Designing And Operating Resilient Database Systems

Authors: Laine Campbell, Charity Majors

1st Edition

978-1491925942

More Books

Students also viewed these Databases questions

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago