Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

without replacement, that is, one red ball is drawn, it cannot be drawn again. E

ID: 3617881 • Letter: W

Question

 without replacement, that is, one red ball 
is drawn, it cannot be drawn again.

Expected Output:
C:ihtiyatyuva eachingCSC175F2007Homeworkshw10>hw10-q5.exe
Enter no. of items to draw (0 to exit): 9
Only 8 objects! Exiting...

C:ihtiyatyuva eachingCSC175F2007Homeworkshw10>hw10-q5.exe
Enter no. of items to draw (0 to exit): 2
green cube
red ball
Enter no. of items to draw (0 to exit): 2
red cube
orange ball
Enter no. of items to draw (0 to exit): 2
green ball
orange cube
Enter no. of items to draw (0 to exit): 2
blue cube
blue ball
Enter no. of items to draw (0 to exit): 0

C:ihtiyatyuva eachingCSC175F2007Homeworkshw10>hw10-q5.exe
Enter no. of items to draw (0 to exit): 8
blue cube
orange ball
orange cube
green ball
red cube
green cube
red ball
blue ball
Enter no. of items to draw (0 to exit): 0

Explanation / Answer

please rate - thanks #include using namespace std; int main() {srand(time(0)); int i,j,num,c,s,starts,ends,startc,endc; char color[]={"redblueorangegreen"}; char shape[]={"ballcube"}; bool balldrawn[5],cubedrawn[5],good; int shapestart[]={0,4,8}; int colorstart[]={0,3,7,13,18}; coutnum; while(num>8||num