
- Write a console application that generates a random number (from 1 - 10) for the user. Display a short menu to the user, informing them which input will generate a random number and which input will terminate the program. Your solution must include a do-while loop and a switch statement.
This is the output from a run of my own code: - Write a console application that reads in an unspecified number of integers, determines how many positive and how many negative values have been read, and computes the total and average of the input values (not counting zero). Your program terminates when the user inputs 0. Display the average as a floating-point number with two digits to the right of the decimal place.
This is the output from a run of my own code: - Conversion from miles to kilometers and from kilometers to miles. Write a console application that prints two adjacent tables as shown in the output below.
- Write a GUI application that prompts the user to enter an integer and then checks to see if the number entered is divisible by 5 and 6. The dialog box displaying results to the user should report on whether the integer entered is divisible by both 5 and 6, by one or the other, or by neither.
Hint: You should use both the logical AND and XOR. You may want to use the ternary operator as well.
These are output from three runs of my own code: