0
1. make a pr0gram that will display the qu0tient of three variables. if the first variable is 50 sec0nd variable will have the value of half the first variable and the third variable will have the value of half the sec0nd variable?
java program
3 Respuestas
0
or you can use for loop also
0
No need to complicate it so much. It's simple: double x = 50; need half that so new variable double y = x/2; Then you need half of that so double z = y/2; Keep it simple :)
- 1
public static void main (String []args){
double x=50.0;
findingHalf(x);
}
public static void findingHalf (double n){
System.out.println (n);
n=n/2;
findingFirstHalf (n);
}
public static void findingFirstHalf (double i){
System. out.println (i);
i=i/2;
findingSecondHalf (i);
}
public static void findingSecondHalf(double m){
System. out.println (m);
m=m/2;
}