void B(short M); void main() { BigConsole(); //Problem 1----------------------------variables and assignment, cout int x = 3, y = 5, z = 7; cout << x << ' ' << y << ' ' << z << endl; x = z - x; y = z - y; z = z - x - y; cout << x << ' ' << y << ' ' << z << endl; x += z; y += z; z += x + y; cout << x << ' ' << y << ' ' << z << endl; cout << endl; //Problem 2-----------------------------------------------------loops // Write a loop that writes all the positive integers // less than 100 that are divisible by 7, one per line. //Problem 3--------------------------------------------------functions // Write a function SphereVol that takes an argument R of type double // and returns the volume of the sphere with radius R. (V = (4/3)ıR^3) //Problem 4---------------------------------------strings & functions // Write a function NumLetters that takes a string argument and returns // the number of letters in the string. (e.g. NumLetters("Da5id") is 4.) //Problem 5--------------------------------------------array-function cout << 3 << " "; B(3); cout << 6 << " "; B(6); cout << 11 << " "; B(11); //Problem 6--------------------------------------------binary numbers //Give the decimal equivalent of each of the following binary numbers: // // 01001100 // 01110101 // 00001111 } void B(short M){ int A[16]; int place; for (place = 0; M > 0; place++){ A[place] = M % 2; M /= 2; } for (place--; place >= 0; place--) cout << A[place]; cout << endl; }