HWK For DAY 16 Class. 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 5 28.32 liters or 1 liter 5 0.353146667 cubic feet.)


HWK For DAY 10 Class. Goes with 12.1 and 13.3*

TBD DAY04* (will be graded)

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: vvi

The equivalent of the CRYPTO Roman numeral vvi 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

#include

#include "CRYPTOroman.h"

using namespace std;

int main()

{

   CRYPTOromanType roman;

   string romanString;

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

   cin & >> romanString;

   cout << endl;

   roman.setRoman(romanString);

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

   << romanString << " is ";

   roman.printPositiveInteger();

   cout << endl;

   return 0;

}


HWK For DAY 06 Pointers. Goes with 10.12 and 11.8*

TBD DAY03* (will be graded)

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;

}


HWK For DAY 02 Arrays. Goes with 7.5*, and 7.12

TBD DAY01* (will be graded)

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];

----------------------