Home / Expert Answers / Computer Science / develop-a-c-program-which-uses-variables-and-cin-and-cout-statements-to-output-your-name-major-n-pa465

(Solved): Develop a C++ program which uses variables and cin and cout statements to output your name, major, n ...



Develop a C++ program which uses variables and cin and cout statements to output your name, major, number of credit hours, per credit hour tuition fee, and cost for the semester.

 

1. Define 2 variables of the appropriate data types and initialize one variable with your name. Use an assignment statement to place your major into the other variable.

2. Variable names must be descriptive.

3. Define variables for “total tuition and fees”, “number of credit hours”, and “cost”, and have the user enter your tuition and credit hours into two of the variables.

4. Calculate your cost for this semester.

5. Use cout to output the values of the variables to the console. Your cout statement MUST use the variables.

6. Output must be labelled and easy to read as shown in the sample output below.

7. Program must be documented with the following:

a. // Name

b. // Date

c. // Program Name

 

 Enter tuition for current semester \( >99.03 \)
Enter credit hours for current semester \( >10 \)
My name is Careful Coder.
I

Enter tuition for current semester \( >99.03 \) Enter credit hours for current semester \( >10 \) My name is Careful Coder. I am majoring in Application Development. I am taking 10 credit hours this semester. I am paying \( \$ 99.03 \) per credit hour fee this semester. My total cost for the semester is \( \$ 990.3 \) Press any key to continue . . .


We have an Answer from Expert

View Expert Answer

Expert Answer


C++ program: #include #include #define ll long long #define mod 1000000007 using namespace std; int main() { string name = "careful coder"; // in
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe