Question: Write a program in FORTRAN 95 that lets the computer continuously roll a set of 5 dice until a Yahtzee is obtained (5 dice that

Write a program in FORTRAN 95 that lets the computer continuously roll a set of 5 dice until a Yahtzee is obtained (5 dice that have the same number). The program should ask the user how many faces each die should have (typically 6), then prints out every roll and result. Implement this using a function that returns the array with the result of each roll. For example, the function roll(6) would return an array would return an array: [1, 3, 5, 3, 6]. An example screen output could be: Enter the number of faces for the dices 6 I roll: 1, 3, 5, 3, 6-no Yahtzee I roll: 2, 2, 2, 2, 2, -Yahtzee! Write a program in FORTRAN 95 that lets the computer continuously roll a set of 5 dice until a Yahtzee is obtained (5 dice that have the same number). The program should ask the user how many faces each die should have (typically 6), then prints out every roll and result. Implement this using a function that returns the array with the result of each roll. For example, the function roll(6) would return an array would return an array: [1, 3, 5, 3, 6]. An example screen output could be: Enter the number of faces for the dices 6 I roll: 1, 3, 5, 3, 6-no Yahtzee I roll: 2, 2, 2, 2, 2, -Yahtzee
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
