Question: I am taking C programming class. I was wondering if you can help me with this question. Sue, do Pseudo-Sudoku The Problem Sue is a

I am taking C programming class. I was wondering if you can help me with this question.

Sue, do Pseudo-Sudoku The Problem

Sue is a TA for an undergraduate intro mathematics class. In an effort to demonstrate that mathematical reasoning can be fun (and that it does not necessarily involve numbers), Sue has

invented the game Pseudo-SudokuThis game is identical to ordinary Sudoku with one exception: where Sudoku uses the digits 1 through 9, Pseudo-Sudoku uses A,B...I. She has assigned Pseudo -Sudoku puzzles to her tutorial section with extra practice, and wishes to have a program to validate solutions. Your program should read ( from a file )an integer n followed by n Pseudo - Sudoku boards; for each board, it should check that the solution is valid. If it is, it should output valid; otherwise, it should output invalid. A Pseudo-Sudoku board is input as nine lines of nine letters each,separated by whitespace. A board is valid if and only if, for every row, column, and each of nine 3x3 sub - boards, every letter appears exactly once.

Sample Input

2

// two boards follow

ABCDEFGHI

DEFGHIABC

GHIABCDEF

BCDEFGHIA

EFGHIABCD

HIABCDEFG

CDEFGHIAB

FGHIABCDE

IABCDEFGH

AAAAAAAAA

AAAAAAAAA

AAAAAAAAA

AAAAAAAAA

AAAAAAAAA

AAAAAAAAA

AAAAAAAAA

AAAAAAAAA

AAAAAAAAA

Sample Output

valid

invalid

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!