## The class Date has a single constructor that accepts the integer value: a month- (1 for January through 12 for December), a day of the month (1-31), and a year (in that order).

LANGUAGE: C++ CHALLENGE: The class Date has a single constructor that accepts the integer value: a month- (1 for January through 12 for December), a day of the month (1-31), and a year (in that order). Given the Date variable datep, dynamically allocate a Date object with the initial value of March 12, 2006, and assign…

## Assume that name is a variable of type string that has been assigned a value. Write an expression whose value is the last character of the value of name. So if the value of name were “Blair” the expression’s value would be ‘r’.

LANGUAGE: C++ CHALLENGE: Assume that name is a variable of type string that has been assigned a value. Write an expression whose value is the last character of the value of name. So if the value of name were “Blair” the expression’s value would be ‘r’.

## In mathematics, the Nth harmonic number is defined to be 1 + 1/2 + 1/3 + 1/4 + … + 1/N. So, the first harmonic number is 1, the second is 1.5, the third is 1.83333… and so on.

LANGUAGE: C++ CHALLENGE: In mathematics, the Nth harmonic number is defined to be 1 + 1/2 + 1/3 + 1/4 + … + 1/N. So, the first harmonic number is 1, the second is 1.5, the third is 1.83333… and so on. Assume that n is an integer variable whose value is some integer N greater…

## The dimensions (width and length) of room1 have been read into two variables: width1 and length1. The dimensions of room2 have been read into two other variables: width2 and length2. Write a single expression whose value is the total area of the two rooms.

LANGUAGE: C++ CHALLENGE: The dimensions (width and length) of room1 have been read into two variables: width1 and length1. The dimensions of room2 have been read into two other variables: width2 and length2. Write a single expression whose value is the total area of the two rooms.

## Diamond Pattern Write a program that displays the following pattern

LANGUAGE: C++ CHALLENGE: Diamond Pattern Write a program that displays the following pattern: * *** ***** ******* ***** *** * Output description: Seven lines of output as follows: The first consists of 3 spaces followed by a star. The second line consists of 2 spaces followed by a 3 stars. The third consists of one space followed…

## Land Calculation One acre of land is equivalent to 43,560 square feet. Write a program that calculates the number of acres in a tract of land with 389,767 square feet.

LANGUAGE: C++ CHALLENGE: Land Calculation One acre of land is equivalent to 43,560 square feet. Write a program that calculates the number of acres in a tract of land with 389,767 square feet.

## Write a loop that reads positive integers from standard input and that terminates when it reads an integer that is not positive.

LANGUAGE: C++ CHALLENGE: Write a loop that reads positive integers from standard input and that terminates when it reads an integer that is not positive. After the loop terminates , it prints out the sum of all the even integers read, the sum of all the odd integers read, a count of the number of even…

## Given a two-dimensional array of integers named q, with 2 rows and 4 columns, write some code that puts a zero in every element of q.

LANGUAGE: C++ CHALLENGE: Given a two-dimensional array of integers named q, with 2 rows and 4 columns, write some code that puts a zero in every element of q. Declare any variables needed to help you.

## You are given a 6×8 (6 rows, 8 columns) array of integers , x, already initialized and three integer variables : max, i and j.

LANGUAGE: C++ CHALLENGE: You are given a 6×8 (6 rows, 8 columns) array of integers , x, already initialized and three integer variables : max, i and j. Write the necessary code so that max will have the largest value in the array x.

## Given an array arr of type int , along with two int variables i and j, write some code that swaps the values of arr[i] and arr[j]. Declare any additional variables as necessary.

LANGUAGE: C++ CHALLENGE: Given an array arr of type int , along with two int variables i and j, write some code that swaps the values of arr[i] and arr[j]. Declare any additional variables as necessary.