Question: Question: Hi, I was wondering if could get some help with this code I can't understand the practice exam. the download is: https://drive.google.com/file/d/1H3__dN24HeqkiaWotRMfRTNR9QSpyJhL/view The code
Question: Hi, I was wondering if could get some help with this code I can't understand the practice exam.
the download is: https://drive.google.com/file/d/1H3__dN24HeqkiaWotRMfRTNR9QSpyJhL/view
The code for p2.cpp
/**
* @file p2.cpp
*
* CS 150 PE02: INTERMEDIATE SELECTION/LOGIC
*
* You have been dealt two cards, a and b.
* Each card has a value 0-100. Set the variable
* nearest to whichever value is nearest to 21
* without going over.
* Do not use any library functions.
*/
int nearest(int a, int b)
{
int result;
// Your code goes here
return result;
}
////////////////// STUDENT TESTS ///////////////////////
#include
using namespace std;
void studentTests()
{
cout
}

2 @file p2.cpp 4 * CS 150 PE02: INTERMEDIATE SELECTION/ LOGIC 6 You have been dealt two cards, a and b. 7 Each card has a value 0-100. Set the variable 8 nearest to whichever value is nearest to 21 9 without going over. e Do not use any library functions. 2 int nearest(int a, int b) 13 4 int result; 6 I Your code goes here 8 return result; 9 2 #include iostream 3 using namespace std; 4 void studentTests) 25 6 cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
