Академический Документы
Профессиональный Документы
Культура Документы
ASSIGNMENT #: 1 - LAB
GENERAL DIRECTION: Write the source codes for the following problem; declare proper variable names and TRACE
the possible output.
Answer must hand-written. Write eligibly; do not use pencil.
Problem # 1:
Given values: First Number = 2.5; Second Number = 3; Third Number = 15; Fourth Number = 25; Fifth Number = 30.
a. The sum of all numbers.
b. The difference between the first number and fifth number.
c. The product of all numbers.
d. The 25% of third number.
e. The sum of following numbers: 10% of first number, 20% of second number, 35% of third number, 40% of fourth
number and 80% of the fifth number.
f. The product of second number and twice of the third number.
g. The cube of the fourth number.
h. The sum of both second number and third number then divided by the product of the first number and fourth
number.
SOLUTION: