Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using Visual Studio 2019- Desktop Development with C++ Intro to Programming in program Assignment purpose: To compile, build, and execute an interactive program using functions
Using Visual Studio 2019- Desktop Development with C++
Intro to Programming in program Assignment purpose: To compile, build, and execute an interactive program using functions from sidioh (prime and scant), functions from ctype. (lower and topper), simple math in and simple programmer defined functions Preprocessor directives deftre _CRT_SECURE_NO_WARNINGS //for Visual Studio compiler pragua warning(eisable16831) 1/igore scanf wordings includest.h> //rint and sunt includestype.h> //tpupper and lower Instructions For this assignment you will be implementing a program that simulates a gas station purchase . The program will welcome the user with a friendly message . Ask the user to enter their first initial (assume the user will enter the initia) . Get the initial from the . Practice using toupper and tolower functions from the ctype.h library Change the initial to lowercase and peint it onto the screen Change the initial to uppercase and print it onto the screen Ask the user to enter the member of gallons (assume the we will enter the correct type of data, integer) . Get the number of gallons from the user . Ask the user to enter the price per gallon (assume the user will enter the correct pe of data, adable) . Get the price from the user Calculate the total and display the results, see the sample output below Your cuiput does not have to exactly match the sample output, but it must include all the information: greeting the and lowercase initial and the moral) Use the following programmer defined functions. DO NOT modify the Functions vold Castingvo.) welcome the user vold Initial Practice(vol) //ask and get a letter for the user 1/display both the lowercase and uppercase version of the letter vold calculatecasPrice veld); //ask and get the number of gallons //ask and get the price per gallon 1/calculate the total and display the result Sample output Welcome to the gas station! First, you will enter your initial and then you will enter the number of gallons, the price per gallon, and I will calculate the total. Please enter your first Initial: T You entered T, lower case is t and uppercase is T How many gallons of gas do you need? 18 What is the price per gallon? 2.87 I will now calculate the total cost for you The total cost will be 51.66 Have a great dayStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started