Spring 2008 Prog 3

Spring 2008 Prog 3 - 3. Prompt the user to input a row...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Program Assignment Number Three Computer Architecture CSC 320 Due February 19, 2008 For your third programming assignment, you are to write MIPS program which will perform the following operations on two dimensional arrays. Initialize a two dimensional array containing the following values: 1 2 3 4 5 10 9 8 7 6 13 54 23 2 6 66,33,82,12,5 22,56,2,9,7 5,0,3,12,74 Write a MIPS program which will perform the following functions in this order: 1. Print the value of a particular array element, if this option is chosen, the program must prompt user for the indices of the element desired. 2. Prompt the user to input a value and search the array, returning a message that the value is either not present or the indices if present
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 3. Prompt the user to input a row number and print the sum of that row 4. Prompt the user to input a column number and print the sum of that column 5. Print the total of all elements in the array. 6. Input 0 to quit. Note: In each case, the appropriate selection should call a separate function to execute the specified task. Use a switch statement to implement this. In all cases, uses appropriate and meaningful message prompts for input and use text that fully explains your output, for example for option 5, The sum of all elements in the array is XXX. Important!!! Your program should not terminate until a 0 is input to quit!!!...
View Full Document

This note was uploaded on 02/10/2012 for the course CSC 320 taught by Professor Simmons,w during the Spring '08 term at S. Alabama.

Ask a homework question - tutors are online