j. (–b + (b * b 4 * a * c)) / (2 * a) – 15. x = 101 y = 28 z = 28 w = 117.5 t = 29.25 17. a. -40 b. 11.5 c. 17.75 d. 18.7 e. 20 f. 88.25 g. 4.0 19. a and c are correct 21. a. int num1; int num2; b. cout << "Enter two numbers separated by spaces." << endl; c. cin >> num1 >> num2; d. cout << "num1 = " << num1 << "num2 = " << num2 << "2 * num1 num2 = " << 2 * num1 num2 << endl; – – 23. A correct answer is: #include <iostream> namespace std; const char = '*'; const int PRIME = 71; int main() { int count, sum; double x; int newNum; //declare newNum = 1; sum = + PRIME; x = 25.67; // x = 25.67; newNum = count * 1 + 2; //newNum = count * ONE + 2; sum++; //(x + sum)++; sum = sum + //sum + count = sum; x = x + sum * count; // x = x + sum * COUNT; sum += 3; //sum += 3--;
j. (–b + (b * b – 4 * a * c)) / (2 * a) 15. x = 101 y = 28 z = 28 w = 117.5 t = 29.25 17. a. -40 b. 11.5 c. 17.75 d. 18.7 e. 20 f. 88.25 g. 4.0 19. a and c are correct 21. a. int num1; int num2; b. cout << "Enter two numbers separated by spaces." << endl; c. cin >> num1 >> num2; d. cout << "num1 = " << num1 << "num2 = " << num2 << "2 * num1 – num2 = " << 2 * num1 – num2 << endl; 23. A correct answer is: #include <iostream> namespace std; const char = '*'; const int PRIME = 71; int main() { int count, sum; double x; int newNum; //declare newNum = 1; sum = + PRIME; x = 25.67; // x = 25.67; newNum = count * 1 + 2; //newNum = count * ONE + 2; sum++; //(x + sum)++; sum = sum + //sum + count = sum; x = x + sum * count; // x = x + sum * COUNT; sum += 3; //sum += 3--;
Odd%20Numbered%20Exercises%20Solutions.docx