program in java to accept length in metre and convert to cm
Answers
Answered by
1
Answer:
import java.util.Scanner;
class Main
{
public static void main(String[] args)
{
Scanner scanner = new Scanner(System.in);
System.out.print("Enter the value in meter:");
double length = scanner.nextDouble();
System.out.println("The length in cm is " + (length*100) + " " + "cm");
}
}
Explanation:
Similar questions