Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A certain video game internally stores the classes of characters as integers. Write a Fortran program that prompts the user for an integer called ClassNum

A certain video game internally stores the classes of characters as integers. Write a Fortran program that prompts the user for an integer called ClassNum whose values should be between 0 and 11, inclusive. Check that the user has entered a value in that range and print an error if he didn't and then end without printing anything else. For entered values in the correct range, use cascaded if statements and c onvert that number into a string, according to the table below. Store the string in a string variable (character array).

0"Barbarian",1"Bard"",2"Cleric",3"Druid",4"Fighter" ,5 "Monk",6 "Paladin",7"Ranger",8 "Rogue",9 "Sorcerer",10"Wizard",11"Aberration"

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

Microsoft Outlook 2023

Authors: James Holler

1st Edition

B0BP9P1VWJ, 979-8367217322

More Books

Students also viewed these Databases questions