Question: Just do program 5 using c++ which are printf and scanf. Please dont use cout and cin. Program 4: A slot machine has three windows.
Program 4: A slot machine has three windows. A random fruit is picked for each window from cherry apple, lemon, and orange. If all three windows match, the user wins 8 times the bet amount. If the first two windows only are cherries, the user wins 3 times the bet amount. If the first window is a cherry and the second window is not a cherry, the user wins the bet amount. Otherwise, the player loses their bet Write a C program that will first allow the user to enter a bet amount. Next, the program should pick 3 random fruits for the 3 windows and print the 3 fruits picked. Lastly, the amount of money won or lost by the user should be displayed Program 5: Write a C program which includes the following functions with parameter passing Function 1:Allow the user to enter 3 float values Function 2: Print the 3 float values Function 3; Use the return statement to return the largest of the 3 float values. Print the largest value in the main. Function 4: Sort the 3 float values from low to high print the 3 float values in sorted order. Upon returning to the main, use your print function to Program 6: Rewrite Program 3 using appropriate functions and parameter passing. Also, please include a structure chart for your program which you can either create by hand or on the computer. Rewrite Program 6 using a looping statement. You may use either a while loop, do loop, or for
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
