Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Marketing Database Analytics

Authors: Andrew D. Banasiewicz

1st Edition

0415657881, 978-0415657884

More Books

Students also viewed these Databases questions

Question

15-5 How will MIS help my career?

Answered: 1 week ago