Please Help! Lost on this coding question

This is a discussion on Please Help! Lost on this coding question within the C Programming forums, part of the General Programming Boards category; hi i'm having a problem with this question: "A simple code can be developed by replacing each character by another ...

  1. #1
    Registered User
    Join Date
    Nov 2011
    Posts
    5

    Please Help! Lost on this coding question

    hi i'm having a problem with this question: "A simple code can be developed by replacing each character by another character that is a fixed number of positions away in the collating sequence. For example, if each charcater is replaced by the character that is two characters to the right, then the letter 'a' is replaced by the letter 'c', the letter 'b' is replaced by the letter 'd', and so on. Write a program that reads the text in a file, and then generates a new file that contains the coded text using this scheme. Do not change the newline characters or the EOF character."

    **I'm clueless and any help would be greatly appreciated to understand how to do this.

  2. #2
    Registered User TheBigH's Avatar
    Join Date
    May 2010
    Location
    Melbourne, Australia
    Posts
    426
    Have you attempted the problem at all, or are you just looking for free code? Show us what you've written so far and we can help you get it working.
    Code:
    while(!asleep) {
       sheep++;
    }

  3. #3
    Registered User
    Join Date
    Nov 2011
    Posts
    5
    Yeah ive been sitting here for a few hrs w/the book trying to figure out which loops to use and how. The general idea of the question stumps me. I'm having trouble with this class and wouldn't mind paying for the help.

  4. #4
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by snicklefritz View Post
    Yeah ive been sitting here for a few hrs w/the book trying to figure out which loops to use and how. The general idea of the question stumps me. I'm having trouble with this class and wouldn't mind paying for the help.
    Stop thinking about code... you're noplace near ready to start coding yet.

    First think about what has to be done, in simple steps... What's the very first thing you need to do? Then what has to happen next? ... think PROCESS... not code. You need to understand the problem itself... work it out on paper...

    Once you understand what is required to do this task, make a step by step PLAN of how to solve the problem.

    Now you can start translating your plan into CODE, entering and testing it in small sections so that by the time you start step 2 step 1 is already working... Don't even think about doing it all at once.

    Finally TEST your program with both good and bad input values and make sure it's working as expected.


    Trust me on this... There is no programmer in the world who can code the solution to a problem he or she does not understand.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Sharp Color 24Bit LCD Touch Screen... coding question.
    By RobertD in forum C Programming
    Replies: 5
    Last Post: 05-15-2011, 06:09 PM
  2. Replies: 18
    Last Post: 05-06-2011, 07:22 PM
  3. C++ Coding Standard Question/Discussion
    By Mastadex in forum C++ Programming
    Replies: 11
    Last Post: 08-13-2008, 10:54 AM
  4. Simple Half-Life Coding Question
    By bengreenwood in forum Game Programming
    Replies: 1
    Last Post: 11-07-2007, 01:18 PM
  5. non-C++, non-coding question!
    By Linette in forum C++ Programming
    Replies: 10
    Last Post: 03-21-2002, 02:10 AM

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