cp6 - C C C C C C C C C C C C C C C * Paul Dinh...

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

View Full Document Right Arrow Icon
C **************************************************** C Paul Dinh C ddinh5@uh.edu C ECE 3331 Program 6 C Spring 2007 C **************************************************** C Purpose - This program will create a specified number of C latin squares and display them in matrix form. It will C then check if they are "magic" or not -- that is, if the C sum of the diagonals of the matrices are equal to the sum C of the rows and columns. C ************************* C Data Files C cp30710.txt - input data file C **************************************************** PROGRAM MAIN INTEGER ISEED, N, NUM, I, A, LATIN(10,10) CHARACTER MAGICTST, MAGIC OPEN(UNIT=23,FILE='cp60710.txt',STATUS='OLD') OPEN(UNIT=24,FILE='cp60710.out') WRITE(24,*)'PAUL DINH' WRITE(24,*)'ECE 3331 PROGRAM 6 SPRING 2007' WRITE(24,*)'--------------------------------------------' 1 READ(23,*,END=999)ISEED,N,NUM WRITE(24,*)' ' WRITE(24,*)'============================================' WRITE(24,*)'iseed = ',ISEED WRITE(24,*)' n = ',N WRITE(24,*)' num = ',NUM WRITE(24,*)'============================================' WRITE(24,*)' '
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 10/26/2011 for the course ECE 3331 taught by Professor Staff during the Spring '08 term at University of Houston.

Page1 / 4

cp6 - C C C C C C C C C C C C C C C * Paul Dinh...

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