A factor of an integer N is an integer that divides N evenly

A factor of an integer N is an integer that divides N evenly. Note that 1 and N are always factors of N. For this task, You will need to write a MIPS program that accepts a positive integer from the standard input, counts and reports how many factors of this integer are even and how many are odd. See the sample run below for required format. Sample runs (user input in blue): Please enter a positive int: 20 User input: 20 Number of odd factors: 2 Number of even factors: 4 Please enter a positive int: 27 User input: 27 Number of odd factors: 4 Number of even factors: 0

Solution

Code:

 A factor of an integer N is an integer that divides N evenly. Note that 1 and N are always factors of N. For this task, You will need to write a MIPS program t

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site