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 16E
Program Plan Intro

Program Plan:

Following variables are used in the program:

Month: It is the enumeration that stores the months and their respective integer values.

stringMon: Enumeration type to store the name of month.

intMonth: To store the integer value of month.

UserInput: To take input from user in string format.

Following functions are used in the program:

Console.ReadLine(): To input month value in string format.

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

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

Summary Introduction:

Program will use define an enumeration Month which will store the month name and its respective integer value. Then Main() method will be used to ask the user to input the integer value of any month. The entered value will be stored in a variable type of Month enumeration after typecasting and name of month will be provided to the user. Program Description:

Purpose of the program asks user to input an integer number within range of 1 to 12 and provide respective month name for the integer.

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.
Write a program that calculates the future value of an investment at a given interest rate for a specified number of years. The formula for the calculation is: futureValue = investmentAmount * (1 + monthlyInterestRate)years*12 Use text fields for the investment amount, number of years, and annual interest rate. Display the future amount in a text field when the user clicks the Calculate button,

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