|
From: Khaveta S. <kh...@ne...> - 2005-01-31 19:14:12
|
Kindly send C++ source codes on the following: Design and develop storage for the hexagonal array of numbers depicted in Figure 1 below. Write a program using the C programming language to implement this data structure and to test (show) that it can store the numbers 1 through 19 such that the sum of each column and each diagonal equals 38. (It is not necessary for rows to sum to 38). Further, you are to invent a notation to describe any element of the hexagonal array and a direction along any diagonal or column. The program must allow the user to use this notation to search for elements/members of the structure. 15 14 14 13 9 8 10 6 4 11 5 12 1 2 18 7 16 17 17 19 3 Figure 1. Magic Hexagon |