Professional Documents
Culture Documents
1. 9 – 5 -3 Answer is 1
2. 2.0 + 3.0 / 5.0 Answer is 2.6
3. 2+3/5 Answer is 2
4. 5/2+3 Answer is 5
5. 2 + Math.pow(3,2) Answer is 11.0
6. Math.pow((2+3), 2) Answer is 25.0
7. 12.0 / 1.0 * 3.0 Answer is 36.0
8. (2 + 3 *4) / (8 -2 + 1) Answer is 2
9. (2 + 3*3) / (8-2+1) Answer is 1
10. (2 .0 + 3*3) / (8-2+1) Answer is 1.57
11. Math.pow(-3.0,2) Answer is 9.0
12. Math.sqrt(6.0+3.0) 3.0
13. Math.exp(3.0-2.0-1.0) 1.0
14. Math.floor(5.0+4.0/3.0) 6.0
Exercise 2
1. Write type statement to declare Temperature, Pressure and Volume to be real variables.
char axis;
Exercise 3
Exercise 4
Write a JAVA assignment statement that calculates the given expression and assigns the results to the
specified variable.
import java.util.Scanner;
int i, j;
double x,y;
x= 37;
i=(int)(x/5);
System.out.printf("%.2f \t %d \n",x,i);
x=input.nextDouble();
i=input.nextInt();
y=input.nextDouble();
j=input.nextInt();
System.out.printf("y= %.2f\n",y);
System.out.printf("j= %d\n",j);
1.74
29
4.23
Thank you for evaluating AnyBizSoft PDF Password Remover.
With the trial version, only the first 3 pages of each file can be exported.
To get all the pages exported, you need to purchase the software from
http://www.anypdftools.com/buy/buy-pdf-password-remover.html