代码如下:
import java.util.Scanner;//用Scanner方法来输入字符
public class Mul{
public static void main(String[] args) {
Scanner scanner=new Scanner(System.in);
System.out.printf("enter number:");
int a=scanner.nextInt();
int b=scanner.nextInt();
System.out.printf("the result is:%d ",a*b);
}
}
输入5和6: