The forums have permanently moved to This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.

Results 1 to 1 of 1

Thread: Memory Game in C Programming

  1. #1

    Memory Game in C Programming

    Another assignment I have is to build a Memory game.

    ...and the code I am given to work with is...

    #include "stdio.h"
    #include "stdlib.h"
    #include "memory.h"

    int main()
    int grid[5][6];
    int matched[5][6];

    int i=0, j=0;

    // Generate the grid

    // Generate the matched grid
    for (i=0; i<5; i++)
    for (j=0; j<6; j++)
    if (i==0 || j==0 || i==j)
    matched[i][j] = 0;
    } // end of if

    matched[i][j] = 1;
    } // end of else

    } // end of for j

    } // end of for i

    // Display the grid
    Display(grid, matched);


    } // end of main()

    This is an example of what it is suppose to look like.
    Last edited by Polaris; February 29th, 2008 at 12:23 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Home About Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012