Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class battles201116 {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- int firstCount = Integer.parseInt(scan.nextLine());
- int secondCount = Integer.parseInt(scan.nextLine());
- int max = Integer.parseInt(scan.nextLine());
- int counter = 0;
- for(int i=1 ; i<=firstCount ; i++){
- for(int j=1 ; j<=secondCount ; j++){
- counter++;
- if (counter > max){
- break;
- }
- System.out.printf("(%d <-> %d) ",i,j);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement