Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Programming Exercise 4 C++ Programming Exercise 4 #1 (C++PE4-1) 1.Name your C++ source code file: C++PE4-1.cpp Write the C++ code for a program that

C++ Programming Exercise 4

C++ Programming Exercise 4 #1 (C++PE4-1)

1.Name your C++ source code file: C++PE4-1.cpp

Write the C++ code for a program that accepts two numbers from a user and displays one of the following messages: "First is larger", "Second is larger", "Numbers are equal".

Use this header for your C++ file:

// C++ Programming Exercise 4 #1

// name

// date

// Program description

// *********************************************************************

C++ Programming Exercise 4 #1 screenshot of C++ source code and run

C++ Programming Exercise 4 #2 (C++PE4-2)

2.Name your C++ source code file: C++PE4-2.cpp

oWrite the C++ code for a program that accepts one salesperson's name and number of sweatshirts sold in the last month. You are to calculate the total value of the sweatshirts sold assuming each sweatshirt cost $30. You are to display the salesperson's name, number of sweatshirts sold, total value of the sweatshirts that were sold, and the message" High Performer", only if the salesperson is a high performerdefined as a person who sells more than $7000 worth of sweatshirts in the month.

Use comments to create three modules (sections) within the main program. The main program declares global variables and then includes housekeeping, detail, and end-of-job modules. The housekeeping module prompts for and accepts a salesperson's name .The detail module prompts for and accepts the number of sweatshirts sold in the month, computes the total value of the sweatshirts, and displays and displays the results for that sales person. The end-of-job module displays the message Thanks for using this program.

Use this format for your C++ file:

// C++ Programming Exercise 4 #2

// name

// date

// Program description

// *********************************************************************

// main program

//Declarations

// housekeeping

// detail

// end-of job

C++ Programming Exercise 4 #2 screenshot of C++ source code and run

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions