- Fe Recursion 09 What Should The Parameter Inside The Recursive Function In Line 11 Contain So That When User Enters An O 1 (54.13 KiB) Viewed 10 times
FE-RECURSION-09 What should the parameter inside the recursive function in LINE 11 contain so that when user enters an o
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
FE-RECURSION-09 What should the parameter inside the recursive function in LINE 11 contain so that when user enters an o
FE-RECURSION-09 What should the parameter inside the recursive function in LINE 11 contain so that when user enters an odd number in the main program, the output should be the next [larger] even number; but when the input is an even number, the result is still the same number? 1 2 3 int mwimwa(int i) 4 { 5 6 #include<stdio.h> Oi if (i % 2) { 7 8 9 10 11 12 } 13 14 int main() 15 { 16 17 18 19 20 Oi-2 i=i+1; return i; } else return mwimwa( int mwimwa (int i) O None of the Choices >; int num; scanf("%d", &num); printf("%d", mwimwa (num)); return 0;