Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.Olympiad2016;
- import java.util.Scanner;
- public class t {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int start = Integer.parseInt(scanner.nextLine());
- int end = Integer.parseInt(scanner.nextLine());
- int maxPrint = Integer.parseInt(scanner.nextLine());
- int printCount = 0;
- for (int i = start; i <= end; i++) {
- for (int j = start; j <= end; j++) {
- printCount++;
- if (printCount > maxPrint) {
- break;
- }
- System.out.print("<" + i + "-" + j + ">");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement