Make a program that will display the multiplication table, the out must depend upon the user input.
SAMPLE OUTPUT:
Please enter a number from 1 to 10: 2
2*1=2
2*2=4
2*3=6
2*4=8
2*5=10
2*6=12
2*7=14
2*8=16
2*9=18
2*10=20
Printable View
Make a program that will display the multiplication table, the out must depend upon the user input.
SAMPLE OUTPUT:
Please enter a number from 1 to 10: 2
2*1=2
2*2=4
2*3=6
2*4=8
2*5=10
2*6=12
2*7=14
2*8=16
2*9=18
2*10=20
It doesn't work like that - the forums are not a homework service and we don't help members cheat. Please read the getting help link in my signature, as well as the following:
http://www.javaprogrammingforums.com...e-posting.html
and what's the problem ?
So you want us to do your homework for you? That's academic dishonesty, and we aren't going to help you cheat.
Please see the link in my signature on asking questions the smart way. What have you tried? Where are you stuck?
Recommended reading: http://www.javaprogrammingforums.com...e-posting.html
Edit- It seems I was a bit late to the party. What they said.
this is simple to do but whats even easier to do is to get a calculator and do it your self
Firstly do you know how to use the Scanner class to read input from the user?
You need to use:
import java.util.Scanner;
to read in a number from the user use:
Code :Scanner scan = new Scanner (System.in); System.out.println("Enter a number between 1 and 10: "); int number = scan.nextInt();