Computer Science, asked by kayaldipannita2, 1 day ago

(D) Write a program in java to accept a length in metre. Convert it to centimetres and display.​

Answers

Answered by khushivishwakarma290
1

import java.io.*;

class convert {

static double Conversion_meter_to_cm(int meter)

{

double centimeter;

centimeter = 100 * meter;

System.out.printf("Value in Centimeter is: %.2f \n", centimeter);

return 0;

}

public static void main(String args [])

{

int meter = 20;

Conversion_meter_to_cm(meter);

}

}

it's Khushi programer

Similar questions