0

write an application that reads a number in inches converts it to meters . note : 1 inch =0.0254meter sample output input value for inch:1000 1000.0 inch is 254 meter

pleas help):

20th Mar 2017, 5:20 PM
Khulud Al-slman
Khulud Al-slman - avatar
11 ответов
+ 5
Sorry , forgot to mention:- Dont forget to import scanner.Do this by writing this code in FIRST line:- import java.util.Scanner;
20th Mar 2017, 5:26 PM
Meharban Singh
Meharban Singh - avatar
+ 4
Anytime @Khulud Al-slman. @Narender Yadav, I am from Punjab,India,Asia,Earth,Solar System
20th Mar 2017, 5:40 PM
Meharban Singh
Meharban Singh - avatar
+ 4
Anytime @Khulud Al-slman
20th Mar 2017, 8:21 PM
Meharban Singh
Meharban Singh - avatar
+ 3
Scanner sc=new Scanner(System.in); double inches=sc.nextDouble(); double mtrs=inches*0.0254; System.out.println(mtrs);
20th Mar 2017, 5:25 PM
Meharban Singh
Meharban Singh - avatar
+ 3
Heres the complete code:- import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner sc=new Scanner(System.in); double inches=sc.nextDouble(); double mtrs=inches*0.0254; System.out.println(mtrs); } } Also, 1000*0.0254=25.4 and not 254
20th Mar 2017, 6:27 PM
Meharban Singh
Meharban Singh - avatar
+ 3
okay thank you bro😩💖
20th Mar 2017, 8:12 PM
Khulud Al-slman
Khulud Al-slman - avatar
+ 2
@meharban_singh from where are you
20th Mar 2017, 5:33 PM
Narender Yadav
Narender Yadav - avatar
+ 2
Why?
20th Mar 2017, 6:24 PM
Meharban Singh
Meharban Singh - avatar
+ 1
ok thank you
20th Mar 2017, 5:32 PM
Khulud Al-slman
Khulud Al-slman - avatar
+ 1
it is not the answer :(
20th Mar 2017, 6:00 PM
Khulud Al-slman
Khulud Al-slman - avatar
+ 1
be come error
20th Mar 2017, 7:38 PM
Khulud Al-slman
Khulud Al-slman - avatar