pa2 - COP 3275 Programming Using C Language Fall 2011,...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
COP 3275 Programming Using C Language Fall 2011, Programming Assignment #2 Yi Wang Radhika Medury Min Chen [email protected] [email protected] [email protected] Due Date: Mon. Oct 10, 2011 @ 12:00pm (noon) NO Late submission is accepted! Problem description: Write a program that asks the user to enter the numbers from 1 to 16 (in any order) and then displays the numbers in a 4 by 4 arrangement, followed by the sums of the rows , columns, and diagonals: Enter the numbers from 1 to 16 in any order: 16 3 2 13 5 10 11 8 9 6 7 12 4 15 14 1 16 3 2 13 5 10 11 8 9 6 7 12 4 15 14 1 Row Sums: 34 34 34 34 Columns Sums: 34 34 34 34 Diagonal Sums : 34 34 If the row, column and diagonal sums are all the same , the numbers are said to form a magic square. You may use simple variables to store all values. Grading Criteria: 1.Compilability: 40% Your source code should be able to compile using “ gcc -Wall ” without any error or warning. The output should be a valid executable. Please note, you are encouraged to
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/30/2011 for the course COP 3275 taught by Professor Jonathanliu during the Fall '11 term at University of Florida.

Page1 / 2

pa2 - COP 3275 Programming Using C Language Fall 2011,...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online