Computers and Technology
Computers and Technology, 20.03.2020 22:02, EMQPWE

Problem 3: Write a recursive function getGCD to calculate the greatest common denominator of two given numbers. For example, getGCD( 12, 9) = 3. The function should have the following declaration: function gcd = getGCD( n1, n2) where inputs n1 and n2 are positive integers and output gcd is the greatest common denominator of n1 and n2. The function should have a description. When the inputs are not positive integers, set the output to be a string 'Error' and use return to exit the function. (a) Set p3a = evalc('help getGCD').

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 14:30, ladawnrowles005
The option enables you to modify a slide element in most presentation applications.
Answers: 2
image
Computers and Technology, 23.06.2019 22:30, BilliePaul95
Janice usually works on a particular workbook that contains all business related data. she decides to keep a backup of all the data in a separate workbook. she opens a new workbook to transfer the data. which option should she use to copy all the data from one workbook to another workbook?
Answers: 1
image
Computers and Technology, 24.06.2019 07:00, Dkhaurithompson
Selective is defined as paying attention to messages that are consistent with one’s attitudes and beliefs and ignoring messages that are inconsistent.
Answers: 1
image
Computers and Technology, 24.06.2019 09:40, anyar
Healthy study habits are best described as
Answers: 1
Do you know the correct answer?
Problem 3: Write a recursive function getGCD to calculate the greatest common denominator of two giv...

Questions in other subjects:

Konu
Social Studies, 05.02.2021 20:40
Konu
Biology, 05.02.2021 20:40
Konu
Mathematics, 05.02.2021 20:40