Computer Science, asked by aryan11425, 9 hours ago

program in java to accept length in metre and convert to cm​

Answers

Answered by samarthkrv
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