Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.codewithDZM;
- import java.util.Scanner;
- import java.util.Random;
- public class Main
- {
- public static void main(String[] args)
- {
- Scanner sc = new Scanner(System.in);
- int n = sc.nextInt();
- for (int i = 1; i < n; i++)
- {
- for (int j = i + 1; j <= n; j++)
- {
- System.out.printf("%2d:%2d ", i ,j);
- }
- System.out.println();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement