void r(int x, int y, int& z) { cout << "r: x = " << x << " y = " << y << " z = " << z << endl; x = x + 1; z = y + x; } void t() { int a, b, x; a = 20; b = 25; x = 250; r(a,b,x); r(x,a,b); cout << "t: a = " << a << " b = " << b << " x = " << x << endl; }
Answer: ________________________________________________________
int mystery(int n) { if(1 == n) return 1; else return 3*mystery(n-1); }
int whatisthis(int n) { if(n == 0) return 1; else return whatisthis(n-1) + whatisthis(n-1); }
struct Plant { int root; double leaf; };Write C++ statements that will create an object called bush of type Plant, and will set bush so that its root variable holds 12 and its leaf variable holds 90.0.