Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Stars
- {
- public static void main(String [] args)
- {
- Scanner keyboard = new Scanner(System.in);
- System.out.print("Enter an integer from 3 to 10: ");
- int num = keyboard.nextInt();
- for (int i = num; i >= 0; i--)
- {
- for (int j = 0; j < i; ++j)
- {
- System.out.print ("*");
- }
- System.out.println();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement