Question: Write a MIPS assembly language program that reads some ticket purchase information from a customer, whether they are daytime tickets, or night light tickets, how

 Write a MIPS assembly language program that reads some ticket purchaseinformation from a customer, whether they are daytime tickets, or night light

tickets, how many adult tickets and child tickets they need. For daytime

Write a MIPS assembly language program that reads some ticket purchase information from a customer, whether they are daytime tickets, or night light tickets, how many adult tickets and child tickets they need. For daytime tickets, customers need to enter 1, for night light tickets, they need to enter 2. If customers enters another number besides 1 or 2, the program should display "Invalid admission." and your program should exit. If the number of adult tickets is less than 0, the number of child tickets is less than 0, or the sum of adult and child tickets is less or equals to 0, then the program should display "Invalid number of tickets." And your program should exit. Each adult ticket for daytime admission is $25, each child ticket for daytime admission is $16, and each adult ticket for night light admission is $20, and each child ticket for night light admission is $10. Your program should compute the total cost and print it along with the number of tickets (people). Your MIPS program needs to work in the same way as the following C program. Please see the sample outputs. int adults, children; int cost; int daynight; int totalPeople; printf("Welcome to our Theme Park! "); printf("Choose 1 for Daytime admission, 2 for NightLights. "); //read an integer from a user input and store it in daynight scanf("%d", &daynight); if (daynight != 1 && daynight != 2) { printf("Invalid admission."); } else { printf("How many adult ticket(s) would you like to purchase? "); 1/read an integer from a user input and store it in adults scanf("%d", &adults); printf("How many child ticket(s) would you like to purchase? "); read an integer fron a user input and store it in children scanf("%d", &children); totalPeople = adults + children; if (adults

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!