import java.util.Scanner;
public class calculation
{
//-----------------------------------------------------------------
// HOW CALCULATE INPUT
//-----------------------------------------------------------------
public static void main (String[] args)
{
int meter;
int centimeter;
Scanner scan = new Scanner (System.in);
System.out.print ("Enter meter : ");
meter = scan.nextInt();
centimeter = meter* 100;
System.out.println ("centimeter is : " + centimeter);
}
}
GO TO CHAPTER 3
Browse: Home > Using Scanner in java(convert metre into centimeter)
0 Comments:
Post a Comment