Ex. 4.2 Recursion, basic arithmetic
You cannot submit for this problem because the homework's deadline is due.
Description
Given two integer, write a recursive algorithm to calculate their GCD.
Format
Files
GNUMake
If you choose GNUMake, then you should compress assignment.h
, ex1.c
, ex2.c
, ex3.c
, main.c
, Makefile
directly into a zip and submit this zip. (A sample Makefile
for hw4 is uploaded on Canvas).
If you just finished ex2 and you immediately want to test whether your ex2 is working correctly. You need to modify your main.c
, assignment.h
, Makefile
(delete ex1.c ex3.c) and then compress main.c
,assignment.h
,Makefile
,ex2.c
into a zip and submit this zip.
The sample Makefile
on Canvas has -o main
, do not change this main
!
CMake
If you choose CMake, then you should compress assignment.h
, ex1.c
, ex2.c
, ex3.c
, main.c
, CMakeLists.txt
directly into a zip and submit this zip. (A sample CMakeLists.txt
for hw4 is uploaded on Canvas).
If you just finished ex2 and you immediately want to test whether your ex2 is working correctly. You need to modify your main.c
, assignment.h
, CMakeLists.txt
(delete ex1.c ex3.c) and then compress main.c
,assignment.h
,CMakeLists.txt
,ex2.c
into a zip and submit this zip.
The sample CMakeLists.txt
on Canvas has add_executable(main ...
, do not change this main
! Also, do not change cmake_minimum_required(VERSION 2.7)
Input
a space separated pair of numbers \(a\) \(b\) on one line
Output
a single number on one line
Sample 1
Input
120 72
Output
24
Homework 4 (Individual)
- Status
- Finished
- Problems
- 3
- Open Since
- 2019-10-20 00:00
- DDL
- 2019-10-27 23:59
- Extension
- 72.0 hour(s)