1. Engineering
  2. Computer Science
  3. write a c program that prompts the user to enter...

Question: write a c program that prompts the user to enter...

Question details

Write a c++ program that

  1. Prompts the user to enter the following information.

                   - Name (First and Last entered together separated by a space)

                   - Age

                   - Address (Handle spaces)

                   - Salary

  1. Display (on one line) the information entered with format given below.

              (Notice that the order is different than how the data was entered)

                   - Name (left justified in a field of 20)

                   - Address (left justified in a field of 20)

                   - Age (right justified in a field of 5)

                   - Salary (right justified in a field of 10, fixed, precision 2)

          Example output (the dashes represent spaces to see them more clearly):

                   Fred Smith----------123 Main St.-----------43--67500.00

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution