ACM (UVa) : 10696


F91

Data type:
Long Integer

Algorithm:

write a procedure/function named f91, whose parameter is: (Long integer N) and it returns a Long Integer; Now:

If N ≤ 100, then return f91 (f91 (N+11)) // recursive call
otherwise, return N-10 // instant return

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s