TBD 01 | Arrays | Goes with 7.5*, and 7.12

You are to write a program that generates an array of 50 components. You will first ask the user to enter 50 integers. At this point the user can either 1) enter 50 integers manually or 2) paste these 50 integers below. You may want to paste them into your code as a comment for easy access.


10 17 23 65 34 6 18 27 35 110 75 25 100 24 19 67 45 88 70 96 41 36 72 150 125 25 77 200 90 166 139 55 31 8 29 119 126 137 34 62 135 121 108 197 45 35 24 1 16 43


Once the aforementioned 50 integers are entered, your program must store them into the array of 50 components. Your program then determines and outputs which numbers in the array are the sum of any two other array elements. If an array element is the sum of two other array elements, then for this array element, the program should output all such pairs. For example, the output for the first three elements is as follows.

Enter 50 integers: 10 17 23 65 34 6 18 27 35 110 75 25 100 24 19 67 45 88 70 96 41 36 72 150 125 25 77 200 90 166 139 55 31 8 29 119 126 137 34 62 135 121 108 197 45 35 24 1 16 43

list[0] = 10 is the sum of:


list[1] = 17 is the sum of: list[47], list[48];


list[2] = 23 is the sum of: list[1], list[5];


TBD 03 | Pointers | Goes with 10.12 and 11.8*

We have used arrays to find the lowest and largest values in an array. We also discussed in class how we can also use pointers to achieve the same goal. For this exercise, I want you write a function that uses pointers to find the smallest element in an array of integers. Use the following main to test your function.

int main()


int list[] = {19, 1, 8, 46, 18, 95, 1, 10, 77, 62, 56, 69, 51, 29, 49};

cout << "The min is " << min(list, 15) << endl;

return 0;


TBD 04 | Classes | Goes with 12.1 and 13.3*

A new Italian crypto has bounced onto the blockchain crypto market call CRYPTOroman You are asked to write C++ code that converts a CRYPTOroman number to an integer. Include a class called CRYPTOroman type where an object of type CRYPTOromanType store the number as a Cryptoroman numeral, convert and store the number as a positive integer. The output will look as such:

Enter a CRYPTO roman number: xi

The equivalent of the CRYPTO Roman numeral xi is 11

The values of the CRYPTOroman numerals are, m 1000, d 500, c 100, l 50, x 10, v 5 and i 1 and your TBD04.cpp’s main should look as follows:

//Main program



#include "CRYPTOroman.h"

using namespace std;

int main()


   CRYPTOromanType roman;

   string romanString;

   cout << "Enter a CRYPTO roman number: ";

   cin & >> romanString;

   cout << endl;


   cout << "The equivalent of the CRYPTO Roman numeral "

   << romanString << " is ";


   cout << endl;

   return 0;


TBD 05 | Inheritance | Goes with 14.13* and 15.1

TBD05* (will be graded)

You have a business that ships liquids in cylindrically shaped containers. Your shipping charges are a function of the amount of the liquid in a container. Assume each is filled to the brim and that you also offer the option to paint the outside of the container for an additional cost. Write a program that:

Asks the user to enter 1) the radius of the base and the height in feet of the container, 2) the shipping cost per liter, 3) the paint cost per square foot.

For your output, show the shipping cost and the cost of painting. Your program will use the class cylinderType given to you on canvas to store the radius and height of the container. Use 1 cubic feet = 28.32 liters or 1 liter = 0.353146667 cubic feet.)

Class Notes Week 01

Following are some tutorials on how to install and run C++ IDEs on a Windows machine.

30/01/2017 NOTES from Ryan Griebenow

This document details two (2) ways to gain access to a Linux environment. The first method, through “CodingGround”, is the quickest to start up but does not offer much customizability and will be slower to code, compile, and test in. The second method, installing a virtual machine, allows greater customizability and speed.

30/01/2017 NOTES from Wes Pearce

Wes says : "Here's a pretty straight forward tutorial on how to setup cygwin with gcc, g++, and make. And again, Visual Studio Community is absolutely free and I had no problems compiling cpp files on it without even going through the hassle of installing cygwin. Hopefully this helps someone."

30/01/2017 NOTES from Jeff Herbst

Jeff says : "Using visual studios express 2015 I did not need to do anything. It just worked. For codeblocks, eclipse, clion, etc i needed to do the following.I used this link to get me started.

I installed the Graphical User Interface Installer from this site. Make sure to let it use the default location. Once this was installed I selected the C and c++ compiler. Then clicked installation in the top right and hit update all. It took about 20 minutes to complete but once it did everything worked on all the compliers I have tried.Hope this helps."

30/01/2017 NOTES from Gillian Conway / Jason Upchurch my former student.

Gillian says : "f anyone has an earlier version of Windows, here is the video done by Professor Upchurch (this is what he had us use in his C class to command line compile, which worked back when I had Windows 8): This feature is not available right now. Please try again later. It contains all that is needed to install cygwin for simple C, including how to change the path variable to force Windows to acknowledge cygwin. In addition to the gcc, it needs the g++, and gdb options (under the devel category, in the options that pop up after you download from the mirror page). Windows 10 does work with MinGW, and that is able to run through Eclipse(I haven't tried the other IDEs yet). This is a very easy install, if you just follow all the steps and make sure to download the compiler for c++."