- 5

Fill in the blanks to define a recursive print function that print number from n to 0

Void print(into n) If(n<0)......; Printf("%d", n); ......(n-1); } https://code.sololearn.com/c411v8s1hekg/?ref=app https://www.sololearn.com/discuss/1950334/?ref=app

31st Aug 2019, 10:52 AM
Juan Concy Lasu
Juan Concy Lasu - avatar
10 Respostas
+ 5
Void print(int n) If(n<0) return; Printf("%d", n); print(n-1); }
11th Dec 2020, 7:26 PM
Kavindu Chinthaka
Kavindu Chinthaka - avatar
+ 2
Void print(into n) If(n<0) return; Printf("%d", n); print(n-1); }
16th Oct 2021, 9:37 AM
Shilpa L
+ 1
int fact(int n) { if (n == 1) return 1; return n * fact(n - 1); }
18th Jan 2022, 4:03 PM
Rugema Didier
0
1.first we have to( return) given expression 2.then we would (print) it again, till it will become zero.
21st Jan 2020, 6:00 AM
Ramendra bharadwaj
Ramendra bharadwaj - avatar
0
void print (int n) { if (n < 0) return; printf ("%d", n); print (n - 1); } //This will work.
21st Dec 2020, 12:36 PM
Aman Shrivas
Aman Shrivas - avatar
0
good it is clear
14th Jan 2022, 5:39 PM
Kodjo Ewli
Kodjo Ewli - avatar
0
Fill in the blanks to define a recursive print function that prints numbers from n to 0. void print(int n) { if (n < 0) return ; printf("%d", n); print (n - 1); }
24th Feb 2023, 6:02 AM
Jembere Guta
Jembere Guta - avatar
- 4
1 return 2 fact
17th Jun 2020, 1:37 AM
Tri Sukma Rivaldy
- 6
1. In the First blank we have to return given expression. 2. Then at the second blank we need to call the it's function print function.
24th Apr 2020, 6:46 AM
Devin Chandula de Silva
Devin Chandula de Silva - avatar
- 10
Tq
7th Apr 2020, 4:24 AM
KONALA LALITHA