
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: Introduction to Computer Science II with Laboratory; Subject: Computer Science; University: Baylor University; Term: Summer II 2005;
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

CIS 1440 Program 5 Due 07/22/
Recurrsion 23:59:
In this assignment you will implement seven recursive functions, and print a table of their
values. Here are the functions.
f (0) = 0, f ( ) x = f x / 2 + 1
f (0) 0, f ( ) x f x / 2 x
f (0) 0, f ( ) x 2 f x / 2 1
f (0) = 0, f ( ) x = 2 f x / 2 + x
For each function evaluate it for all integer values from 0 through 20, and print the results
in a table. Line 1 has the value of each function at zero, Line 2 has the value of each
function at one, and so forth, until you have printed 21 lines. Set the width of the output
field to 8, so the numbers line up. This will be enough to give you a space between each
number, since the largest number will have 7 digits.