Starting from:

$25

CS220-Quiz 3 Solved

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."

More products