You are given two variables, already declared and assigned values, one of type double, named price, containing the price of an order, and the other of type int, named totalNumber, containing the number of orders.

Visual Basic

LANGUAGE: Visual Basic CHALLENGE: You are given two variables, already declared and assigned values, one of type double, named price, containing the price of an order, and the other of type int, named totalNumber, containing the number of orders.  Write an expression that calculates the total price for all orders.

Read More

You are given two variables, already declared and assigned values, one of type double, named totalWeight, containing the weight of a shipment, and the other of type int, named quantity, containing the number of items in the shipment.

Visual Basic

LANGUAGE: Visual Basic CHALLENGE: You are given two variables, already declared and assigned values, one of type double, named totalWeight, containing the weight of a shipment, and the other of type int, named quantity, containing the number of items in the shipment.  Write an expression that calculates the weight of one item.

Read More

You are given two double variables, already declared and assigned values, named totalWeight, containing the weight of a shipment, and weightOfBox, containing the weight of the box in which a product is shipped.

Visual Basic

LANGUAGE: Visual Basic CHALLENGE: You are given two double variables, already declared and assigned values, named totalWeight, containing the weight of a shipment, and weightOfBox, containing the weight of the box in which a product is shipped.  Write an expression that calculates the net weight of the product.

Read More

A wall has been built with two pieces of sheetrock, a smaller one and a larger one.  The length of the smaller one is stored in the variable small.

Visual Basic

LANGUAGE: Visual Basic CHALLENGE: A wall has been built with two pieces of sheetrock, a smaller one and a larger one.  The length of the smaller one is stored in the variable small.  Siumilarly, the length of the larger one is stored int he variable large.  Write a single expression whose value is the length…

Read More

Given the variables fullAdmissionPrice and discountAmount (already declared and assigned values), write an expression corresponding to the price of a discount admission.

Visual Basic

LANGUAGE: Visual Basic CHALLENGE: Given the variables fullAdmissionPrice and discountAmount (already declared and assigned values), write an expression corresponding to the price of a discount admission.  (The variable discountAmount holds the actual amount discounted, not a percentage.)

Read More