Visual Basic
Write an expression that computes the average of the values 12 and 40.
LANGUAGE: Visual Basic CHALLENGE: Write an expression that computes the average of the values 12 and 40.
Read MoreWrite an expression that computes the average of the variables exam1 and exam2 (both declared and assigned values).
LANGUAGE: Visual Basic CHALLENGE: Write an expression that computes the average of the variables exam1 and exam2 (both declared and assigned values).
Read MoreWrite an expression that cmputes the average of the values 12 and 40.
LANGUAGE: Visual Basic CHALLENGE: Write an expression that cmputes the average of the values 12 and 40.
Read MoreWrite an expression that computes the average of the varialbes exam1 and exam2 (both declared and assigned values).
LANGUAGE: Visual Basic CHALLENGE: Write an expression that computes the average of the varialbes exam1 and exam2 (both declared and assigned values).
Read MoreEach 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.
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 MoreThe 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.
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 MoreAssume 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.
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 MoreIn 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.
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 MoreWrite an expression for the average number of tickets sold per school child.
LANGUAGE: Visual Basic CHALLENGE: Three classes of school children are selling tickets to the school play. The number of tickets sold by these classes, and the number of children in each of the classes have been read into these variables: tickets1, tickets2, tickets3 and class1, class2, class3. Write an expression for the average number…
Read MoreAssume 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.
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 MoreAssume 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.
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 MoreThe area of a square is stored in a double variable named area.
LANGUAGE: Visual Basic CHALLENGE: The area of a square is stored in a double variable named area. Write an expression whose value is the length of the diagonal of the square.
Read More