You are on page 1of 14

Republic of the Philippines

AURORA STATE COLLEGE OF TECHNOLOGY


Brgy. Zabali,3200 Baler, Aurora, Philippines

DEPARTMENT OF INFORMATION TECHNOLOGY

Name: Angelo Albert T. Manzanares Date: 04-18-21


Course: BSIT 1F

Laboratory Exercises / Practices:

1. Write a Java program to print 'Game On' on the console and then print
your name on a separate line.
Republic of the Philippines
AURORA STATE COLLEGE OF TECHNOLOGY
Brgy. Zabali,3200 Baler, Aurora, Philippines

DEPARTMENT OF INFORMATION TECHNOLOGY

Your program code here: (screenshot of your program)


Republic of the Philippines
AURORA STATE COLLEGE OF TECHNOLOGY
Brgy. Zabali,3200 Baler, Aurora, Philippines

DEPARTMENT OF INFORMATION TECHNOLOGY

Your printed output in the console here: (screenshot of your output)


Republic of the Philippines
AURORA STATE COLLEGE OF TECHNOLOGY
Brgy. Zabali,3200 Baler, Aurora, Philippines

DEPARTMENT OF INFORMATION TECHNOLOGY

2. Write a Java program to print the sum of two numbers.

Test Data:

85+103
Republic of the Philippines
AURORA STATE COLLEGE OF TECHNOLOGY
Brgy. Zabali,3200 Baler, Aurora, Philippines

DEPARTMENT OF INFORMATION TECHNOLOGY

Your program code here: (screenshot of your program)


Republic of the Philippines
AURORA STATE COLLEGE OF TECHNOLOGY
Brgy. Zabali,3200 Baler, Aurora, Philippines

DEPARTMENT OF INFORMATION TECHNOLOGY

Your printed output in the console here: (screenshot of your output)


Republic of the Philippines
AURORA STATE COLLEGE OF TECHNOLOGY
Brgy. Zabali,3200 Baler, Aurora, Philippines

DEPARTMENT OF INFORMATION TECHNOLOGY

3. Write a Java program to divide two numbers and print on the screen.

Test Data:

200/4

Expected Output:

50

Your program code here: (screenshot of your program)


Republic of the Philippines
AURORA STATE COLLEGE OF TECHNOLOGY
Brgy. Zabali,3200 Baler, Aurora, Philippines

DEPARTMENT OF INFORMATION TECHNOLOGY

Your printed output in the console here: (screenshot of your output)


Republic of the Philippines
AURORA STATE COLLEGE OF TECHNOLOGY
Brgy. Zabali,3200 Baler, Aurora, Philippines

DEPARTMENT OF INFORMATION TECHNOLOGY

4. Write a Java program to print the result of the following operations:

Test Data:

a. -18 + 9 * 7
b. (99+109) % 7
c. 87 + -7*7 / 15
d. 56 + 78 / 11 * 89 - 9 % 4

Expected Output:

45
5
84
678
Republic of the Philippines
AURORA STATE COLLEGE OF TECHNOLOGY
Brgy. Zabali,3200 Baler, Aurora, Philippines

DEPARTMENT OF INFORMATION TECHNOLOGY

Your program code here: (screenshot of your program)


Republic of the Philippines
AURORA STATE COLLEGE OF TECHNOLOGY
Brgy. Zabali,3200 Baler, Aurora, Philippines

DEPARTMENT OF INFORMATION TECHNOLOGY

Your printed output in the console here: (screenshot of your output)


Republic of the Philippines
AURORA STATE COLLEGE OF TECHNOLOGY
Brgy. Zabali,3200 Baler, Aurora, Philippines

DEPARTMENT OF INFORMATION TECHNOLOGY

5. Write a Java program to print the sum (addition), multiply, subtract,


divide and remainder of two numbers.

Test Data:

Input first number: 125


Input second number: 24

Expected Output:

125 + 24 = 149
125 - 24 = 101
125 x 24 = 3000
125 / 24 = 5
125 mod 24 = 5
Republic of the Philippines
AURORA STATE COLLEGE OF TECHNOLOGY
Brgy. Zabali,3200 Baler, Aurora, Philippines

DEPARTMENT OF INFORMATION TECHNOLOGY

Your program code here: (screenshot of your program)


Republic of the Philippines
AURORA STATE COLLEGE OF TECHNOLOGY
Brgy. Zabali,3200 Baler, Aurora, Philippines

DEPARTMENT OF INFORMATION TECHNOLOGY

Your printed output in the console here: (screenshot of your output)

You might also like