Microsoft Visual C#
Microsoft Visual C#
7th Edition
ISBN: 9781337102100
Author: Joyce, Farrell.
Publisher: Cengage Learning,
bartleby

Concept explainers

Question
Book Icon
Chapter 2, Problem 17E
Program Plan Intro

Program Plan:

Following variables are used in the program:

Planet: It is the enumeration that stores the planet name and their respective position values.

stringMon: Enumeration type to store the name of month.

planetPosition: To store the position value of the planet.

userInput: To take input from user in string format.

Following functions are used in the program:

Console.ReadLine(): To input position value of the planet in string format.

Convert.ToInt32(): To convert the entered value in string format to integer format.

Console.WriteLine(): To display the name of planet entered by the user and other instructions to user.

Summary Introduction:

Program will define an enumeration Planet which will store the planet name and its respective position value in the solar system. Then Main() method will be used to ask the user to input the position value of any planet. The entered value will be stored after typecasting in a variable type of Planet enumeration, and the name of the planet will be provided to the user.

Program Description:

Purpose of the program is prompted to the user to input an integer number within range of 1 to 8 describing the position of planet and provide respective planet name for the integer value.

Blurred answer
Students have asked these similar questions
Create a program that prompts the user for an amount less than 100 and then displays the minimum number of coins necessary to make the change. The change can be made up of quarters, dimes, nickles, and pennies
Create a program that will display the geometric sequence of an input number and input common ratio. This will also count and display how many terms are there in the sequence. The program will only display the sequence between 0 to 1000.
Create a c++ langauge that ask the user to enter a name (one word only) and then print the name in the form of letter “V”.   Example: Enter a name: Samuel S                  S   a              a    m        m      u       u        e   e           l

Chapter 2 Solutions

Microsoft Visual C#

Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
  • Text book image
    Microsoft Visual C#
    Computer Science
    ISBN:9781337102100
    Author:Joyce, Farrell.
    Publisher:Cengage Learning,
    Text book image
    EBK JAVA PROGRAMMING
    Computer Science
    ISBN:9781337671385
    Author:FARRELL
    Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT