Create in C++
Prompt the user to enter a 3-letter abbreviation or a day of the week and display the full name of the day of the week. Use an enumerated data type to solve this problem.
Enumerate the days of the week in a data type.
Start with Monday and end with Friday.
Set all of the characters of the user input to lower case.
Set an enumerated value based on the user input.
Create a function that displays the name of the day
Based on the value passed from main(), the function should display the corresponding full name of the day of the week.
If the user entered a correct 3-digit abbreviation for a day of the week in step 4, then call the function your created in step 5.
If the user did not enter a correct 3-digit abbreviation for a day of the week, then display an error message.
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 1 images
- Given two integers that represent the miles to drive forward and the miles to drive in reverse as user inputs, create a SimpleCar variable that performs the following operations: • Drives input number of miles forward • Drives input number of miles in reverse Honks the horn • Reports car status SimpleCar.h contains the struct definition and related function declarations. SimpleCar.c contains related function definitions. Ex: If the input is: 100 4 the output is: beep beep Car has driven: 96 miles 1 #include 2 3 #include "SimpleCar.h" 5 int main() { 6 8 9 10 } /* Type your code here. */ return 0; Current file: main.c Load default templatearrow_forwardWrite a c++program that asks the user to enter a part number to order. The rules for creating a part number are as follows:a) The first character must be an ‘A’, ‘B’, or ‘C’.b) The second and third characters must be numeric; their value when taken as a pair must be between 10 and 49 (inclusive).c) The fourth character must be a lowercase letter.d) The fifth and sixth characters must be numeric; their values when taken as a pair must be between 22 and 66 (inclusive).Display a message indicating whether the entered part number is valid or not.arrow_forwardC++arrow_forward
- Create the following program that prompts a user to enter 10 integers. Create a user-defined function to print the 10 integers the user enters. C programming languagearrow_forwardIn C++ Declare a variable named Holiday and initialize it to "New Year". Use the appropriate data typearrow_forwardc not c++arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education