Name: ____________________________________________________ Alpha: _____________
Section: ________
Describe help received: _________________________________________________________________
See the bottom for how to submit your work.
Due: Before 0800 on next class day
|
|
sum. The function
sums integers from start and end. For example,
sum(2,5) will return 14, because we have 2+3+4+5 = 14.
Fill out the blank.
int sum(int start, int end)
{
if( start > end )
return -1; // error!
if( )
return end;
else
return start + ;
}
Bring to class