This is due in 2 days its supposed to be simple but i just cant get it.
Write a program that will print out statistics for a user-specified number of coin tosses. First the user should be asked about the total number of coin tosses possible. For this project, the total number of coin tosses will be restricted to three choices (4, 6, and 8). If an incorrect choice is entered, display an error message and exit. If a correct choice is entered, the user will input either an ‘h’ for heads or a ‘t’ for tails for the number of user-specified number of tosses. The program will then print out the total number and percentages of heads and tails. Use the increment operator to count each ‘h’ and ‘t’ that is input. For example, a possible sample dialog might be
Please enter the total number of coin tosses (You have a choice of 4, 6, or 8 total number of coin tosses): 8
For each coin toss enter either ‘h’ for heads or ‘t’ for tails.
Enter toss #1 output: h
Enter toss #2 output: t
Enter toss #3 output: t
Enter toss #4 output: h
Enter toss #5 output: t
Enter toss #6 output: h
Enter toss #7 output: t
Enter toss #8 output: t
Number of heads: 3
Number of tails: 5
Percent heads: 37.5
Percent tails: 62.5
If anyone knows how to create this it would be greatly appreciated