Вы находитесь на странице: 1из 3

Page 1 of 3

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:

CARLOS, RAMIL CHRISTIAN R. GRADE


SECTION:
SURNAME FIRSTNAME M.I
1D IT101: Intermediate Computer Programming
DATE:
08/30/2019
Page 2 of 3
ASSIGNMENT #: 1 - LAB
SOLUTION CONTINUED…….

CARLOS, RAMIL CHRISTIAN R. GRADE


SECTION:
SURNAME FIRSTNAME M.I
1D IT101: Intermediate Computer Programming
DATE:
08/30/2019
Page 3 of 3
ASSIGNMENT #: 1 - LAB
TRACE AN OUTPUT

CARLOS, RAMIL CHRISTIAN R. GRADE


SECTION:
SURNAME FIRSTNAME M.I
1D IT101: Intermediate Computer Programming
DATE:
08/30/2019

Вам также может понравиться