[SOLVED] CS220-Quiz 3

25.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

Rate this product

1. Write a MIPS assembly language code to calculate and display the value of the slope of the line connecting the two points whose coordinates are (x1, y1) and (x2, y2).

2. Write a MIPS assembly language code to input a number N and express it of the form N=7x+y such that y<7. For e.g: 22 = 7*3 + 1. Your program should print in the form: N = (x, y) after printing the values of x and y.

3. Write a recursive function to do binary search on a given sorted array for a given element. Write a
main function that takes  a sorted array of n elements and an integer k to search in the array as inputs (from keyboard) and searches for k in the array using the binary search function. If it founds the data, then it will print the the index of data k or it will print “no data found.”

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.