Recursive Functions
COMP 273 Assignment 3 – Fall 2021
Submission instructions
All work must be your own, and must be submitted by MyCourses. Include your name and student
number in a comment at the top of your source file. Submit only one file, a3.asm. Do not use a
zip archive. Check your submission by downloading your submission from the server and checking that
it was correctly submitted. You will not receive marks for work that is incorrectly submitted.
Implementation
In this assignment, you will use recursive function calls to implement the following function:
int f(n) {
if ( n <= 1 ) return 1 ; else return f(n-1) + f(n-3) + 1 ; } Steps 1. Ask the user to input n from the console. You can assume the user will only enter an integer 2. Compute f(n) using recursive functions 3. Print f(n) on the console Marking • -2 marks for incorrect answer • -2 marks for not using recursive functions