Computer Science, asked by Dharmakc14, 3 days ago

WAP to ask a number and display its multiplication table.

Answers

Answered by atrs7391
2

import java.util.Scanner;

public class Main {

   public static void main(String[] args) {

       Scanner sc = new Scanner(System.in);

       System.out.println("Enter N: ");

       double n = sc.nextDouble();

       for (int i = 1; i <= 10; i++) {

           System.out.println(n + " x " + i + " = " + (n*i));

       }

   }

}

Similar questions