Please Help

This is a discussion on Please Help within the C Programming forums, part of the General Programming Boards category; I'm in a group of 4 and need to make this program in C. The other three have no idea ...

  1. #1
    Registered User
    Join Date
    Feb 2012
    Posts
    23

    Please Help

    I'm in a group of 4 and need to make this program in C. The other three have no idea what there doing. I have a good idea but the entire program is hard for me to grasp.

    Please could anyone code this for me? I swear I'm not just using you I will go through and make it my own. I just need a structure to go on. Once you create the function to place the array of chars in the grid you just change it by +1 or -1 for the 8 directions. ....UP, down left right and the four diagonals.

    Thank you very very much if you can code this for me!

    It basically creating just a crossword puzzle


    Each group member must create at least two functions (including main).

    You can have many more if you want. The program is to generate a puzzle
    search game SHEET ONLY.

    The program will input between 1 and 16 words.

    The program will create a word search puzzle such as followsL

    //Sorry the grid does not line up as it does on my computer.

    COMMITMENTAPPLEYOUAREMYSUNSHINEYOUMAKEMEHAPPYWHENS KIESAREGREYSDYOUAREM
    HOCKEYSUPPOYOUNEVERKNOWDEARHOWMUCHILOVEYOUSOPLEASE DONTTAKEMYDENNISHUNC
    DISNEYRIDELIGAPPLEYOUAREMYSUNSHINEYOUMAKEMEHAPPYWH ENSKIESAREGREYSDENIS
    ASTROASTRORAPPLEYOUAREMYSUNSHINEYOUMAKEMEHAPPYWHEN SKIESAREGREYSJOSHBRO
    HARRYPORTERRAPPLEYOUAREMYSUNSHINEYOUMAKEMEHAPPYWHE NSKIESAREGREYSTIMTIM
    LATENIGHTTVTAPPLEYOUAREMYSUNSHINEYOUMAKEMEHAPPYWHE NSKIESAREGREYSGANDOF
    VALUEROOMSSAPPLEYOUAREMYSUNSHINEYOUMAKEMEHAPPYWHEN SKIESAREGREYSTHEWHIT
    ............
    APPLEYOUAAAAAAAAAAARBBYSUNSHINEYOUMAKEMEHAPPYWHENS KIESAREGREYSSONNYSON
    APPLEYOUAREMYSUNSHINEYOBBBBBBBBBBUMAKEMEHAPPYWHENS KIESAREGREYSMOTHERAS
    APPLEYOUAREMYSUNSHINEYOUMAKEMEHABBBBBBBBBBPPYWHENS KIESAREGREYSDADDYDAD
    APPLEYOUAREMYSUNSHINEYOUMAKEMEHAPPYWHENSKICCDAEAEA QQESAREGREYSSOUNLNEL
    APPLEYOUAREMYSUNSHINEYOUMAKEMEHAPPYWHENSKIESAREGRE GEADESSESEEYSGOODJOB
    APPLEYOUAREMYSUNSHINEYOUMAKEMEHAPPYWHENSKIESAREGRA DGAGASEASEEYSBADJOBB
    APPLEYOUAREMYSUNSHINEYOUMAKEMEHAPPYWHENSKIESAREGRA DGAGASEASEEYSBADJOBB
    APPLEYOUAREMYSUNSHINEYOUMAKEMEHAPPYWHENSKIESAREGRA DGAGASEASEEYSBADJOBB
    APPLEYOUAREMYSUNSHINEYOUMAKEMEHAPPYWHENSKIESAREGRA DGAGASEASEEYSBADJOBB
    APPLEYOUAREMYSUNSHINEYOUMAKEMEHAPPYWHENSKIESAREGRA DGAGASEASEEYSBADJOBB

    1. APPLE 9. INDIAN
    2. BUS 10. JAWS
    3. CAT 11. KITE
    4. DOG 12. LOVE
    5. ELEPHANT 13. MOUSE
    6. FISH 14. NICE
    7. GREEN 15. OVER
    8. HUNCHUCK 16. ZEBRA


    You are to generate 70 letters in a row and 25 rows. You are to randomly
    place the words into the grid. The words can be placed in one of eight
    directions. You must allow for the words to cross each other.

    Once the 1 to 16 words have been placed into the grid you are to fill
    in the remaining places with other letters. Once you have the grid
    completed (all words entered and all spaces filled in), you are to
    create a list of the 1 to 16 words under the grid in two columns in
    alphabetical order. The output needs to go to the screen and to a text
    file. Please remember this program is not playing a game only building
    a hardcopy word search puzzle.

    Deliverables:
    1. TeamName.c source code (*.h if necessary) (working source code)
    2. TeamName.txt (the latest version of the output)
    3. Design layout document(s) [whatever you used to design the code]
    a. I P O Chart
    b. Structure Chart
    c. Flow Chart
    d. Pseudo Code
    4. Individual Team Assessment Sheets for yourself and each team member

    All members will attend on there assigned days at their assigned times.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    20,980
    Please refer to the homework policy: "The purpose of these board is not for other people to do your homework for you."
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Feb 2012
    Posts
    23
    Then can I get any help with the function that would place the word from left to right on the grid.

  4. #4
    Registered User
    Join Date
    May 2009
    Posts
    2,372
    Quote Originally Posted by JustinH View Post
    Then can I get any help with the function that would place the word from left to right on the grid.
    Till you post some of your code; likely you will get no help.

    Function to reverse string; note, since you are asking for help the grader would likely decide you cheated if you use the code in the link.
    Because it is more complex then a beginner student would write.
    http://www8.cs.umu.se/~isak/snippets/strrev.c

    Tim S.
    Last edited by stahta01; 02-14-2012 at 10:13 AM. Reason: Added link
    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the Universe is winning." Rick Cook

  5. #5
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    20,980
    Sure. What are your ideas on the grid generation, and what have you done so far?

    Actually, "the other three have no idea what there doing" thing is just bad: if you're taking the lead, you need to get your team into action, not be a hero.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  6. #6
    Registered User
    Join Date
    Feb 2012
    Posts
    23
    Quote Originally Posted by laserlight View Post
    Sure. What are your ideas on the grid generation, and what have you done so far?

    Actually, "the other three have no idea what there doing" thing is just bad: if you're taking the lead, you need to get your team into action, not be a hero.
    I'm on my iPad so I can get my code so far, but I have the grid as a char array

    grid[70][25]

    And that will give me a grid. But when i get a word from the user and place it into my array of words how do I get them onto the grid. I don't have any idea where to start.
    Last edited by JustinH; 02-14-2012 at 10:17 AM.

  7. #7
    Registered User
    Join Date
    Sep 2008
    Location
    Toronto, Canada
    Posts
    1,831
    Code:
    char grid[70][25]
    char word[100];
    int len, startrow, startcol;
    /* At some point a word was read into the 'word' string. */
    
    len = strlen(word);
    startrow = 5;
    startcol = 7;
    /* put word horizontally */
    for (i = 0; i < len; i++)
        word[startrow][startcol + i] = word[i];

  8. #8
    Registered User
    Join Date
    Feb 2012
    Posts
    23
    Sorry I think some of you didn't understand what I was asking for. I worded it all weird. I have I think all but the directions to go off of. When I get home I'll post my code I have. Thanks for the help! Glad I found this site.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21