Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started