AP CS Test 1 
Name     _____________________________________________________________
What comes out?
1.	System.out.println(6 /  8 * 4 - 3);             ________________  
2.	System.out.println(12 + 5 / 2 + 3);           _______________
3.	System.out.println(12.0 / 5 * 2);               _______________       
4.	System.out.println(7 + 4 % 3 + 8);           ________________
5.	System.out.println(6 / ( 4 % 2) + 3);         _________________
6.	System.out.println(9 + 4 +2 * 3);             __________________
7.	System.out.println(6 % 4 * 7 % 3);         __________________
8.	System.out.println(4.0 / 2 + 3 / 5);          __________________
9.	System.out.println(83 / 7 + 2 * 5);           _________________
10.	System.out.println(7 * 2 / 5 + 3);             __________________
11. Write a program that will let you enter 3 prices and will then print out the total 
price of the items with sales tax included. (sales tax is 6%)
Sample Output :
 Enter 3 prices 134.56  123.45  98.76
Sales tax is 21.41
Total Cost is 378.18
 
12. Write a program that will let you enter total inches and will then print out the
 total feet and inches left over.
Sample Output :
 Enter total inches 62
You are 5 feet 2 inches
 



13. Write a program that will let you enter the length and width of a rectangle and 
will then print out the area and the perimeter
Sample Output :
 Enter length 8 
Enter width 6
Perimeter is 28 and area is 48
 
14. Write a program that will let you  enter 3 numbers and will then print out the 
sum and the average.

15. Write a program that will let you enter the number of adults and the number of children and will 
then tell you the cost of the movie tickets. 
Adult tickets cost 9.50
 and children are 5.00.
Sample Output :
 Enter number of adults 5 
Enter number of children 3
Total cost is $57.50

16. Write a program that will let you enter hours worked and salary per hour and 
will then tell you your salary for the week.
Ex
Enter hours worked 12
Enter salary per hour 8.50
You made 102.00