Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. package TimesTable;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class TimesTable {
  6.  
  7. public static void main(String[] args) {
  8. Scanner input = new Scanner(System.in);
  9.  
  10. int count = 1;
  11.  
  12. System.out.println("Input a number");
  13. double num = input.nextDouble();
  14.  
  15. while (count < 11){
  16. double total = num*count;
  17. System.out.println(num + " times " + count + " is " + total);
  18. count++;
  19. }
  20. }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement