(D) Write a program in java to accept a length in metre. Convert it to centimetres and display.
Answers
Answered by
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
Hindi,
13 hours ago
Social Sciences,
13 hours ago
Math,
1 day ago
History,
1 day ago
Math,
8 months ago
Social Sciences,
8 months ago