In this section, you will learn to convert Meters To Miles.
The following program helps you in converting Meters To Miles.
To convert Meters To Miles we have used a formula "meter = * 0.00062137119;". The compiler will ask to enter the number of Meters from the keyboard due to the method "BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));". Here we have taken meter to be of type Int. To avoid loss of precession we have cast the output to be in double.
Here is the code of the program:
Output of the program:
Enter the Meters:1
Enter the Meters:4
Liked it! Share this Tutorial