Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package TimesTable;
- import java.util.Scanner;
- public class TimesTable {
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- int count = 1;
- System.out.println("Input a number");
- double num = input.nextDouble();
- while (count < 11){
- double total = num*count;
- System.out.println(num + " times " + count + " is " + total);
- count++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement