CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2014
    Posts
    1

    Question New here and dont know where to ask for help

    this is my problem

    this is what it says if you can could you complete it so i can work on with coding it?

    write a program in pseudocode that helps the user add up coins in there piggy bank.the program should ask:"how many pennies","how many two pennies","how many 5 pences"ect then it should give the total value of the piggy bank.





    definition of pseudocode
    a notation resembling a simplified programming language, used in program design.



    this would be the building blocks of my software.

  2. #2
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,822

    Re: New here and dont know where to ask for help

    Firstly, have a look at http://forums.codeguru.com/showthrea...ork-assignment

    Have you been given a notation for writing the required pseudocode?
    Have a look at http://en.wikipedia.org/wiki/Pseudocode

    What programming language will you be using?

    A program design is basically a set of English (or other natural language) statements that when followed will produce the required outcome. For something like this, a possible first step would be to state how you would do it using a pen and paper and then refine this into a program design, psesdocode and then the actual program.

    Basically, the steps to produce a working program are
    Code:
    specify input requirements
    specify output requirements
    define required algorithms
    do {
         produce program design 
         produce pseudocode (if required)
         produce code in required langauge
         test program
         debug program
    } while program_not_working
    If you need further guidance with this, post the pseudocode you have. As this is an assignment, we won't write this for you but will provide guidance on what you post.

    Have fun!
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  3. #3
    Join Date
    Sep 2000
    Location
    Indianapolis
    Posts
    6,754

    Re: New here and dont know where to ask for help

    I agree with 2kaud - simply write out in English (or your native language) what you would need to do to add up the money in the piggy bank. That will be the first step towards pseudocode. For example, if I wanted to count number of cats and dogs at the kennel, I'd"

    Go Kennel
    Enter first room
    count number of cats and add it to the total of all cats
    count number of dogs and add it to the total of all dogs
    Go to the next room
    Keep doing this until all room checked and final
    Present totals

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured