Académique Documents
Professionnel Documents
Culture Documents
Make it sure to do it by yourself. And it's your choice to give values to variables
Try to implement as much as you can. If you cann't implement leave it. We will discuss
it in class
Question 2:In the following program, explain why the value "6" is printed twice in a row:
class PrePostDemo {
public static void main(String[]
int i = 3;
i++;
System.out.println(i);
//
++i;
System.out.println(i);
//
System.out.println(++i); //
System.out.println(i++); //
System.out.println(i);
//
}
}
args){
"4"
"5"
"6"
"6"
"7"
(a/b)-(c/d) = ((a*d)-(b*c))/(b*d)
(a/b)*(c/d) = (a*c)/(b*d)
(a/b)/(c/d) = (a*d)/(b*c)
Question 4:Implement the following formulas (Only Two formulas will be in same application )
Area of Triangle (b h)/2
Area of (b1 + b2) h/2 // you have detect the precedence by itself
Volume of a sphere: (4/3) pi r3
pi r2 Height
hint: r2 = r*r
where pi = 22/7
I = ART
Question 8:
Find SURFACE AREA (SA) of
Cude Formula 6*s*s
Cylinder
Formula 2*pi*r*h