No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
7. Write a simple C++ program that performs addition, subtraction, multiplication, division, exponentiation, base-10 logarithm, and factorial operations. The program should start with a menu letting the user to choose one of the eight operations the user wants to perform. A sample menu is given below (hint: use loop to … |
|
I have to write a multiple choice program and the following code is as far as i've gotten. It's coming back with invalid answers and I'm not sure where i'm doing it wrong. You’ve been asked to write a program to grade a multiple choice exam. The exam has 20 … |
|
What is wrong with the following code segment? [CODE] const int limit = 100; int eprep[limit]; int examp[limit]; for (int index = 0; index <= limit - 1; index++) { eprep[index] = 0; examp[index] = 0; } if (eprep == examp) cout << "Equal"; [/CODE] At first I thought it … |
|
What is the side effect in the following function? [CODE] int ExamPrep (int param1, int& param2) { if (param2 = param1) return param2; else if (param2 > param1) return param1; else return param1 * param2; } [/CODE] A side effect is defined as the result of an operator, expression, statement, … |