Question: Using If and else and switch, how would you write code that would display 3 every time a 1 is rolled with any other numbered

Using If and else and switch, how would you write code that would display 3 every time a 1 is rolled with any other numbered dice?

For example:

die roll 5, 1 = 3 , roll 4,1 =3 , roll 1,1 =3 and so on

die roll 1, 6 = 3 , roll 1, 4=3 , roll 1, 2= 3 and so on

Note: everything should roll the same unless a 1 is invovled

Thank-you

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!