Please write in RISC V programming language Plase check your answer before answering 2. Write a RISC-V function to find GCD of two numbers using recursion. int findGCD(int a,int b) { while(a!=b) {...



 Please write in RISC V programming language



 Plase check your answer before answering


2.<br>Write a RISC-V function to find GCD of two numbers using recursion.<br>int findGCD(int a,int b)<br>{<br>while(a!=b)<br>{<br>if(a>b)<br>return findGCD(a-b,b);<br>else<br>return findGCD(a,b-a);<br>}<br>return a;<br>}<br>

Extracted text: 2. Write a RISC-V function to find GCD of two numbers using recursion. int findGCD(int a,int b) { while(a!=b) { if(a>b) return findGCD(a-b,b); else return findGCD(a,b-a); } return a; }

Jun 02, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here