Advertisement
acappelwest

Untitled

Oct 13th, 2015
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.47 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class Stars
  3. {
  4.     public static void main(String [] args)
  5.     {
  6.         Scanner keyboard = new Scanner(System.in);
  7.         System.out.print("Enter an integer from 3 to 10: ");
  8.         int num = keyboard.nextInt();
  9.        
  10.         for (int i = num; i >= 0; i--)
  11.         {
  12.             for (int j = 0; j < i; ++j)
  13.             {
  14.                 System.out.print ("*");
  15.             }
  16.             System.out.println();
  17.         }
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement