Question: C++ home work ________________________________ 1a) int addition (int a, int b) { int r; r=a+b; } What is wrong with this function? The parameter list
C++ home work ________________________________ 1a) int addition (int a, int b) { int r; r=a+b; }
What is wrong with this function?
| The parameter list is wrong |
| The variable definition is wrong |
| The calculation is wrong |
| Something is missing _______________________________ 2b)You wish to determine whether the contents of var1 and var2 are not equal. What is missing? if(var1 _____ var2) ___________________________________ 4) Which would you use to get an unknown number of values entered by a user?
Which type of variable is total and what is it used for? void countUp() { int total = 0; for (int i = 0; i < 100; i++) { std::cout << i<< std::endl; total = total + i; } ______________________________________ 5c) Which type of variable is total and what is it used for? void countUp() { int total = 0; for (int i = 0; i < 100; i++) { std::cout << i<< std::endl; total = total + i; }
|
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
