Computer Science, asked by Gucock, 1 month ago

Write down a program in Java to accept a number and display its first 10 multiples​

Answers

Answered by mohammadadnan7
0

Answer:

import java.util.*;

class Number{

public static void main(String args[]){

Scanner sc=new Scanner(System.in);

int a,i,b;

System.out.println("enter a number");

a=sc.nextInt();

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

b=a*i;

System.out.println(b);

} // end of for loop

} // end of main

} // end of class

Explanation:

hope this will help you.

Similar questions