Question: The code I wrote is really obnoxious because I didn't fully understand the question when I was solving this problem, but will it still work?
The code I wrote is really obnoxious because I didn't fully understand the question when I was solving this problem, but will it still work?

5. Write a function named modulo that takes in 2 number parameters, named [xlandly and returns the result x % y, You may assume that both x and y are positive. Note: In order to receive any credit, you may not use the modulo operator, and you must use a while loop. let modulo = (x: number, yi number): number = { while (acy) { return yi while (x >=1) { if (x % y === 0) { return 0; } else { let s = xy; return si
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
