Advertisement
cesarnascimento

tabuada 2 for ex 9 fernando

May 30th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.42 KB | None | 0 0
  1. package exercicios;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class ex9fernando {
  6.  
  7.     public static void main(String[] args) {
  8.         Scanner sc = new Scanner(System.in);
  9.        
  10.         int num;
  11.        
  12.         System.out.println("Digite o número: ");
  13.         num = sc.nextInt();
  14.        
  15.         System.out.println("Tabuada do número "+num+": ");
  16.         for(int i = 1;i <= 10;i++){
  17.             System.out.println(num +"x"+i+" = "+(num * i));
  18.         }
  19.     }
  20.     /* César N. */
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement