Thread: buying pet from pound

  1. #1
    Registered User
    Join Date
    Jan 2003
    Posts
    2

    buying pet from pound

    I need help on getting a program started. I am not asking for anyone to write the whole program. I just need help on getting it started. I have to write a program on buying a pet from the pound, have to show the final cost after cust go through the menu of choices to choose fr. I would appr. any help on this. Thank you.

  2. #2
    Senior Member joshdick's Avatar
    Join Date
    Nov 2002
    Location
    Phildelphia, PA
    Posts
    1,146
    Code:
    int main()
    {
    Instructions();	// if needed
    option = Menu();
    switch(option)
    {
    	case 1:	// do stuff
    	.
    	.
    	.
    	default:	// do stuff when incorect input is entered
    }
    //Continue outputting menus of options and inputting choices as much as needed
    Calculations(/*variables go here*/);
    Output(/*variables go here*/);
    return 0;
    }
    There's something rough to get you started. It sounds to me like you just need to think this through using top-down design. Decompose your large problem into small problems that can be coded as functions. As a general rule, try to keep functions small enough so that you can view at least a whole one at once on your screen.

    I don't know how else to help you. If you don't understand top-down design, you can search the web or buy a book. This seems like a really simple problem to me. If you need any specific help, ask a specific question in this forum. I hope this has helped you. Good luck
    FAQ

    "The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.

    "If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.

  3. #3
    Registered User
    Join Date
    Jan 2003
    Posts
    2

    Smile just a thank you

    Hey joshdick just want to thank you for your reply. I think it will get me strated.

  4. #4
    Senior Member joshdick's Avatar
    Join Date
    Nov 2002
    Location
    Phildelphia, PA
    Posts
    1,146

    Smile Re: just a thank you

    Originally posted by Shalyndria
    Hey joshdick just want to thank you for your reply. I think it will get me strated.
    Your quite welcome. *warm, fuzzy feeling*
    FAQ

    "The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.

    "If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Pet Hates
    By twomers in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 10-21-2006, 04:08 AM
  2. How to ignore the pound sign?
    By ebullient in forum C Programming
    Replies: 5
    Last Post: 12-03-2005, 03:35 AM
  3. Buying RAM (how many pins?)
    By Stan100 in forum Tech Board
    Replies: 2
    Last Post: 08-15-2005, 07:00 PM
  4. Is VC++ worth buying?
    By nickname_changed in forum C++ Programming
    Replies: 9
    Last Post: 03-15-2003, 06:38 AM
  5. Pet Peeve: Compilers vs. Languages
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 05-13-2002, 01:51 AM