FE-RECURSION-09 What should the parameter inside the recursive function in LINE 11 contain so that when user enters an o

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
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

Post by answerhappygod »

Fe Recursion 09 What Should The Parameter Inside The Recursive Function In Line 11 Contain So That When User Enters An O 1
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 9 times
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;
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply