This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: CP6.1 ECE 3331 COMPUTER PROBLEM 6 Spring 2007 (due 4/27) Your assignment is simply to redo Computer Problem 3 in Fortran77. That is, in this assignment you are to write a Fortran program that will read from a data file named cp60710.txt a sequence of triples of integers, iseed , n ,and num . For each triple, you are to construct num "random" n n Latin squares using the algorithm described below and, for each square determine whether or not it is "magic". You may assume that 2 n 10. Your program must include: (1)a main program which reads values for iseed, n, and num. The values for iseed, n and num should be written, clearly labeled, to the output file cp60710.out. Then in a loop on the number of squares, the main program should invoke the subroutine gen (described below) to generate a Latin square, write it out to cp60710.out in usual matrix form, clearly labeled, invoke function magictst (described below) to determine whether it is a magic square,and write to cp60710.out an appropriate message based on the test. Your program should continue to read and process iseed,n, and num until the an appropriate message based on the test....
View Full 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.
- Spring '08