Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Exercise A: (Personal Information) Refer to Week-1 Assignment, Exercise A, Personal Information. This time, ask the user to enter their first name, last name, age,
Exercise A: (Personal Information)
Refer to Week-1 Assignment, Exercise A, 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 an 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 a 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 calculations 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.
Hint: Please pay attention to Section 3.8 (Working with characters and String Objects) about how to use getline() function.
Step 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