Each of the walls of a room with square dimensions has been built with two pieces of sheetrock, a smaller one and a larger one.  The length of all the smaller ones is the same and is stored in the variable small.  Similarly, the length of all the larger ones is the same and is stored in the variables large.  Write a single expression whose value is the total area of this room.  DO NOT use the pow function.

Visual Basic

LANGUAGE: Visual Basic CHALLENGE: Each of the walls of a room with square dimensions has been built with two pieces of sheetrock, a smaller one and a larger one.   The length of all the smaller ones is the same and is stored in the variable small.   Similarly, the length of all the larger ones…

Read More

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 of the two rooms.

Visual Basic

LANGUAGE: Visual Basic 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 of the two rooms.

Read More

Assume that children is an integer variable containing the number of children in a community and that families is an integer variable containing the number of families in the same community.  Write an expression whose value is the average number of children per family.

Visual Basic

LANGUAGE: Visual Basic CHALLENGE: Assume that children is an integer variable containing the number of children in a community and that families is an integer variable containing the number of families in the same community.   Write an expression whose value is the average number of children per family.

Read More

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.833… and so on.  Write an expression whose value is the 8th harmonic number.

Visual Basic

LANGUAGE: Visual Basic 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.833… and so on.   Write an expression whose value is the 8th harmonic number.

Read More

Assume that n is an integer variable whose value is some integer N greater than 1.   Assume also that hn is a double variable whose value is the Nth harmonic number.  Write an expression whose value is the (n-1)th harmonic number.

Visual Basic

LANGUAGE: Visual Basic 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.833… and so on.   Assume that n is an integer variable whose value is some…

Read More

Assume that n is an integer variable whose value is some integer N greater than 1.   Assume also that hn is a double variable whose value is the Nth harmonic number.   Write an expression whose value is the (N+1)th harmonic number.

Visual Basic

LANGUAGE: Visual Basic 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.833… and so on.   Assume that n is an integer variable whose value is some…

Read More