# [Solved by Experts] Items Cout

[Solved by Experts] Items Cout

OBJECT: Write a program to read from the keyboard two integer values with

appropriate prompt messages and to do the following:

1. Compute and print their sum with an appropriate message.

2. Compute and print their product with an appropriate message.

3. Add their sum to their product and print the result with an appropriate

message.

4. Compute and print their difference (first – second) with an appropriate

message.

5. Compute the quotient of (first / second) and print it with an appropriate

message.

6. Compute the remainder of (first % second) and print it with an appropriate

message.

INPUT: two integer values.

OUTPUT: As specified above.

METHOD: For this program and any other program that you will write in this class you

should do the following:

1. At the top of the program, make a box which includes the lab. assignment number, a

general description of the program, your name (first name and last name), The class and

section number, the date and the due date. For example,

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

/* LAB. ASSIGNMENT #1 */

/* Program to generate a table of powers of an integer n */

/* */

/* Programmer: John Smith */

/* Class: CS 230-99 */

/* Date: February 6, 1995 */

/* Due Date: February 13, 1995 */

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

2. Before each section of your program, provide a description of what is done in that

section. Make the comments show how the program is subdivided. Make these comments

occupy a whole line, and provide a blank line before each one. Also document all your

variables. For example,

#include <iostream>

using namespace std;

/

*——————————————————————————————————————————–

——*/

int count; /* the number of items */

double value, /* an item value */

average; /* average value of all items */

/*——————————————— Read in the number of items

————————————————–*/

cout << “\nPlease enter the number of items:\t”;

cin >> count;

TOPICS: arithmetic expressions, cout, cin, program documentation and

indentations. Avoiding repeated computations.

You must return the following (in this order):

1. The program source file

2. The program output

Tags: