Question: CIS 210 Introduction to C++ Programming (Fall 2017) Assignment Points: 100 Due Date: 4/26/2017 (beginning of class) 1. A magic square is a two-dimensional array
CIS 210 Introduction to C++ Programming (Fall 2017) Assignment Points: 100 Due Date: 4/26/2017 (beginning of class) 1. A magic square is a two-dimensional array of positive integers, which have the following characteristics: The number of rows equals the number of columns All entries must be positive integers The sum of all entries in each row, each column and the two diagonals are write a C++ program to determine if a set of numbers represents a magic 4x4 a Square. Read a set of numbers from the keyboard (see sample input below) validate the input to ensure integer numbers are positive. If a negative number is given, generate an error message and prompt the user to reenter a number Your program must include the foliowing functions: o main-display welcome message, declare array, call user defined functions getinput, checksums, checkRowSums, checkColsums, check Diagsums, and o splayResult o getlnput -prompts uur for and validates the input (see sample input below) o checksums computes an initial sum and then calls the functions checkRowSums, checkColSums, and checkDiagsums. The functions checkRowSums, checkColSums, and checkDiagSums should return a Boolean value that indicates if the corresponding sums represent a magic square. Note: the checkRo checkColsums, and heckDiagSums functions should only be called ifnecessary o displayResult-displays the results (see sample output below)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
