1 A. Write a Java program that takes a number as input and prints its multiplication table upto 10.

Program:

import java.util.Scanner;

 

class Multiplication_Table

{

public static void main(String args[])

{

Scanner sc= new Scanner(System.in);

 

System.out.println("Enter the number");

int a =sc.nextInt();

 

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

{

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

}

}

}

Comments

Popular posts from this blog

Program using Light Sensitive Sensors on Tinkercad

Blink LED pattern using Arduino on Tinkercad

Custom Buttons in Android