English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Assume the following function F();

unsigned F(unsigned n)
{
if (n==0)
return 0;
//else
returnF(n/10) + n % 10;

what will be returned by the function call?

F(0)
F(1)
F(2)
F(10)
F(11)
F(12)
F(22)

any help is gladyl appresiated thanks

2007-03-21 15:07:49 · 1 answers · asked by DJ F 1 in Computers & Internet Programming & Design

1 answers

F(0) = 0
F(1) = 1
F(2) = 2
F(10) = 1
F(11) = 2
F(12) = 3
F(22) = 4
n be an integer

2007-03-21 15:26:50 · answer #1 · answered by Andy T 7 · 0 0

fedest.com, questions and answers