Professional Documents
Culture Documents
Itcs 113 T1 S1 2018 - 2019 Fa
Itcs 113 T1 S1 2018 - 2019 Fa
Exam #1
Form A
Date: 22nd October 2018 Duration: 1 Hour
STUDENT NAME
STUDENT ID # SECTION #
1 10
2 10
3 10
TOTAL 30
Page 1 of 4
Question 1 (10 Points)
What is the output of the following codes?
(1) int a = 13, b = 3, c = 2; 4 2.36
double z = 6.72; 1
System.out.println(a/b +"\t"+ (c+z/2-b)); 6*4*1
a = b % c;
System.out.println(a);
a = ++b + c--;
System.out.println(a + "*" + b + "*" + c);
System.out.println((double)first);
System.out.println((int)second);
Page 2 of 4
Question 2 (10 Points)
A housing project sells pieces of land and the price is determined according to their area and location. The cost per
square meter is determined as indicated in the table below.
LOCATION PRICE PER METER SQUARE
“SINGLE ROAD” BD 200
“TWO ROADS” BD 220
“CORNER” BD 230
Draw a flowchart that reads the land area (in square meters) and its location, then compute and print its total cost.
Page 3 of 4
Question 3 (10 Points)
Write a java program that reads the salary of an employee. Then it
SAMPLE INPUT/OUTPUT
calculates and prints the income tax (2% of total salary) and community
deduction (1% of total salary). Finally, the program should calculate and Please Enter the salary: 552
print the net salary. Income tax = 11.04
Community deduction = 5.52
Net Salary = 535.44
Page 4 of 4