Moons gravity

 Moons gravity


Problem Description


The Moons gravity is about 16.6 percent that of Earths.Write a program that computes your effective weight on the Moon.


Note:


Use Double Data Type

Logic Test Case 1


Input (stdin)

53


Expected Output


8.798

Logic Test Case 2


Input (stdin)

75



Code Area


import java.io.*;

import java.util.Scanner;

public class TestClass {

public static void main(String[] args)

     { 

       Scanner s=new Scanner(System.in);

       double weight=s.nextInt();

       double mw=(weight*(16.6))/100;

       System.out.println(mw);

}

}

Post a Comment

0 Comments