fork download
  1. import java.util.*;
  2.  
  3. public class Main{
  4. public static void main(String[] args){
  5. Scanner sc = new Scanner(System.in);
  6. int x = sc.nextInt();
  7.  
  8. for(int i=1;i<=9;i++){
  9. System.out.print(x + " * "+ i + " = "+ (x*i));
  10. }
  11. System.out.println();
  12. }
  13. }
Success #stdin #stdout 0.15s 38104KB
stdin
2
stdout
2 * 1 = 22 * 2 = 42 * 3 = 62 * 4 = 82 * 5 = 102 * 6 = 122 * 7 = 142 * 8 = 162 * 9 = 18