Question: i need help converting this C++ in MIPS to run on QtSPIM. i can't get anything to run correctly. can someone help? #include using namespace

i need help converting this C++ in MIPS to run on QtSPIM.

i can't get anything to run correctly. can someone help?

#include using namespace std;

void computeCoin(int coin_value, int &number, int &amount); void inputData(int &amount);

int main() { int amount,number; char option; do {

inputData(amount); cout << amount << " cents can be given as" << endl; computeCoin(25, number, amount); cout << number << " quarter(s) "; computeCoin(10, number, amount); cout << number << " dime(s) "; cout << amount << " penny(pennies)" << endl; cout << "Do you want to continue again?(Y/N): "; cin >> option; cout << endl; }while(option == 'Y' || option == 'y'); return 0; } void computeCoin(int coin_value, int &number, int &amount) { number = amount / coin_value; amount = amount - number * coin_value; } void inputData(int &amount) { cout << "Enter the amount of change in cents: "; cin >> amount; while(amount < 1 || amount > 99) { cout << "Amount between 1 and 99 (inclusive): "; cin >> amount; } cout << endl; }

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 Databases Questions!