Answered step by step
Verified Expert Solution
Question
1 Approved Answer
the last picture is example or hint to the CIS-210 Introduction to C++ Programming (Fall 2017) Assignment-5 Points: 100 Due Date: 4/26/2017 (beginning of class)
the last picture is example or hint to the
CIS-210 Introduction to C++ Programming (Fall 2017) Assignment-5 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 magic4x4 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 following functions: o main-display welcome message, declare array, call user defined functions getlnput, checksums, checkRowSums, checkColSums, checkDiagSums, and a 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, checkCoISums, and checkDiagsums. The functions checkRowSums, checkColSums, and checkDiagsums should return a Boolean value that indicates ifthe corresponding sums represent a magic Square Note: the check R check Col and checkDiagSums functions should only be called if necessary o display Result -displays the results (see sample output below)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started