Concept explainers
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.
Trending nowThis is a popular solution!
Chapter 2 Solutions
Microsoft Visual C#
- Please provide the whole JAVA source code for attached screenshot's assignment.arrow_forward3. Randomly generate a number in range [1, 12]. Map this number to a season: if the number is 3, 4, or 5, map it to “Spring", if the number is 6, 7, or 8, map it to "Summer", if the number is 9, 10, or 11, map it to "Fall", and if the number 12, 1, or 2, map it to "Winter". Display season namearrow_forwardUsing C# in Microsoft Visual Studio create an application that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows:1. When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Do not display the computer’s choice yet.)2. The user selects his or her choice of rock, paper, or scissors. To get this input you can use Button controls, or clickable PictureBox controls displaying some of the artwork that you will find in the student sample files.3. The computer’s choice is displayed.4. A winner is selected according to the following rules:• If one player chooses rock and the other player chooses scissors, then rock wins. (Rock smashes scissors.)• If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors…arrow_forward
- You are tasked with writing an interactive size finder for a T-shirt company. The program should prompt the user for their chest measurement in inches then return the user’s size according to the company’s three size charts: kids, women, and men. Input prompt: “Chest measurement in inches: ” You can assume the user will enter a number (rather than a string or boolean). Inform the user of the sizes that are available as follows (see examples 1 and 2): Your size choices: Kids size: <size> Womens size: <size> Mens size: <size> ...where <size> is the name of the matching size on the appropriate chart (S, M, L etc.) or “not available” if the chart does not have a matching size for the user. If there are no matching sizes for the user (i.e. all three charts are “not available”), print “Sorry, we don't carry your size” instead of the message above. See example 3 below. Example input / output # 1 (user input is shown in blue) Chest measurement in inches: 32.5Your…arrow_forwardInput a value for the variable y so that the variable x becomes 4 after the code executes. favorite_numbers = y favorite_numbers.remove(-1) x = len(favorite_numbers)arrow_forwardWrite an application that allows a user to enter any number of student quiz scores, as integers, until the user enters 99. If the score entered is less than O or more than 10, display Score must be between 10 and O and do not use the score. After all the scores have been entered, display the number of valid scores entered, the highest score, the lowest score, and the arithmetic average. An example of the program is shown below: Enter a score >> 6 Enter another score or 99 to quit >>» 7 Enter another score or 99 to quit >» 9 Enter another score or 99 to quit >» 7 Enter another score or 99 to quit >> 99 4 valid scores were entered Highest was 9 Lowest was 6 Average was 7.25arrow_forward
- Microsoft Visual C# 7th edition. need help, please. Thanks In previous chapters, you created applications for Marshall’s Murals. Now, modify the version of the MarshallsRevenue program created in Chapter 5 so that after mural data entry is complete, the user is prompted for the appropriate number of customer names for both the interior and exterior murals and a code for each that indicates the mural style: L for landscape S for seascape A for abstract C for children’s O for other When a code is invalid, re-prompt the user for a valid code continuously. For example, if Y is input, output Y is not a valid code, and re-prompt the user until a valid code is entered. After data entry is complete, display a count of each type of mural. For example the output should be in the following format with the correct number next to each mural type: The interior murals scheduled are: Landscape 1 Seascape 2 Abstract 1 Children's 3 Other 9 The exterior murals scheduled are: Landscape 4 Seascape 0…arrow_forwardJAVA:arrow_forwardWrite an application that determines whether a phrase entered by the user is a palindrome. A palindrome is a phrase that reads the same backward and forward without regarding capitalization, spaces or punctuation. And it will allow the user to enter as many phrases as he likes after each iteration.arrow_forward
- One way to make sure that a variable has been assigned a value is to __________ the variable with a value when you declare it. a. concatenate b. initialize c. delimit d. restrictarrow_forwardcreate an application that will find the largest and the smallest number of a series of integers input by the user. Assume that the user will input only integers that are between -100 and 100 (both inclusive) (no need to validate the input). When the user inputs 101, the application should output the smallest and the largest number.arrow_forwardPlease put comment at each step of the programarrow_forward
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT