ECE216H1 Lecture 35: Brown Lecture 35

26 views2 pages
Recursive code
Recalt Functionthatfinds 7i
int FINDSUM int NE
intsum
whale No
Sum N
N
return sum's
Read
thisfunction as arecursive function
int FINDSUMCint NJ
ifCNN.io
return0
3elseE
g3return N1FIND
SUM ND
Example
smain program calls AND
SUM
C5X
FIND
SUM Freturn 51FIND
SUMMIT
FINO
SOM
Ca return 41FIND
SUM
1374
FIND
SUM 3return 3tFINDS
UMC
FIND
SUM 2return 2tFIND
saucily
FINDSUNG returnaFIND
SUM
10174
FIND
suchlo return 05
Unlock document

This preview shows half of the first page of the document.
Unlock all 2 pages and 3 million more documents.

Already have an account? Log in

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Questions