1. Mit ír ki az f (9)?
void f(int x) { if(x%5!=0) { x=x*5/2; f(x); } else x=x-1; cout << x; }a. 225554 b. 545522 c. 55109 d. 92255 2. Mit ír ki az f(2024)
void f(int x) { if(x>=24) if(x%2==0) { cout<<2; f(x/2); } else { f(x/2); cout<<4; } else cout<<0; }a.) 04424222 b. 22220444 c. 22242440 d. 44402222
int f(int x, int y) { int z; if (y==0) return 1; z=f(x,y/2); if (y%2!=0) return z*z*x; return z*z; }a. 1 b. 2 c. 9 d. 18
void f (int n) { if(n!=0) f(n/2); cout << n%2; }a. 100111 b. 111010 c. 010111 d. 01251123
int f(int n,int k) { if(n==0 || k==0) return 0; return n%k+10*f(n/k,k); }a. 1022 3. b. 355 c. 102 d. 33