Write program that ask from
the user to enter the mass and radius and display the result of m
the result in floating point.

Description:
By writing
the equation as m*r*r display the result
Solution
public class Message {
public static void main(String[] args) {
float mass=99.9f,radius= 44.4f;
System.out.println("The result is ="+(mass*radius*radius));
}
}
Output:
196938.88
No comments:
Post a Comment