85. JAVA Program to Print Multiples of given number upto 200.
How does this program work?
- This program is used to print multiples of given number upto 200 using Java.
Here is the code
//To print Multiples of given number upto 200
import java.util.Scanner;public class Multiple
{
public static void main(String args[] )
{
int i,n=200,s;
// Enter a number for display its multiples
System.out.println("Enter the number :\n") ;Scanner skill=new Scanner(System.in );
s=skill.nextInt();
System.out.println("The Multiples of"+s) ;
for(i = 1 ; i <= n ; i++)
if (i % s == 0)
System.out.println(+ i ) ;
}
}