Question
For C++ Refer to Week-1 for Personal Information. This time, ask the user to enter their first name, last name, age, salary, and bonus. Note:
For C++ Refer to Week-1 for Personal Information.
This time, ask the user to enter their first name, last name, age, salary, and bonus.
Note:
In this exercise, pay attention to the data type.
Age can't be in decimal. Must pick the data type as int data type for age.
Salary and bonus can be in decimal. Make sure, your code should be able to handle numbers entered by the user in decimal.
When you add salary and bonus, the final output may be in decimal. Your code should be able to handle them.
You must add the line gap in the output if there is a line gap in the output.
Don't do any calculation manually. Your program should be able to handle the sum of 2 numbers.
I am attaching the expected output with this exercise. You must match your output with mine.
Expected Output:
Hint: Please pay attention to Section 3.8 (Working with characters and String Objects) about how to use getline() function. Do not use cin twice to get the first name and last name. Must use getline to get the full name.
----In this program, I am asking your personal information!--.-- Enter your First and Last name: Nidhi Tilak Enter your Middle name: Sinha Enter your Age: 42 Enter your Salary: 100.34 Enter your Bonus: 35.5 *****Here is your complete information.***** Full name: Nidhi Tilak Middle name: Sinha Age: 42 Your salary with bonus: 135.84Step 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