QP6 - on four lines Each line will contain a single row of...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Quiz Program #6 Program Description: Increasing 4x4 Squares An increasing 4x4 square is one where the values in each row are in increasing order AND the values in each column are in increasing order. (As stated, each of these squares has 4 rows and 4 columns.) Your job will be to write a program that reads in several 4x4 squares of numbers from a file and determines whether or not each of those squares is an increasing square. Read your input from the file, "squares.txt". Here is the format of the input file: The first line of the input file will contain a single positive integer, n, representing the number of squares to check. Each of the squares will follow, with data for a single square
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: on four lines. Each line will contain a single row of the square, with four integer values, all separated by spaces. For each input case, output a single line to the screen with one of the two following formats: Square #k: Increasing Square Square #k: Not an Increasing Square The output for each case should be on separate lines (see sample below). Sample Input File 3 1 2 3 4 2 3 4 5 6 7 8 9 5 6 7 8 1 2 3 4 2 3 4 5 5 6 7 8 6 7 8 9 10 11 12 20 13 15 16 19 14 20 25 30 20 22 27 33 Sample Output Square #1: Not an Increasing Square Square #2: Increasing Square Square #3: Not an Increasing Square...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online