Thread: Sum of 5 numbers flowchart

  1. #1
    Registered User
    Join Date
    Oct 2014
    Posts
    5

    Sum of 5 numbers flowchart

    Hi there, could you please have a look at my flowchart and let me know of it is correct ? These are the instructions for the question.
    Thank you.
    Design an algorithm using flowchart to prompt the user for 5 values. Total up all these values and print the total at the end of the program. If the number is equal to zero the system will terminate.

    Sum of 5 numbers flowchart-sum-5-numbers-jpg

  2. #2
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    It is not correct.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  3. #3
    Registered User
    Join Date
    Oct 2014
    Posts
    5
    Quote Originally Posted by grumpy View Post
    It is not correct.
    Hi thanks for replying. Which part is not correct ?

  4. #4
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Ummmm ..... all of it. It has definite signs of guesswork.

    Consider

    1) If i is initialised to zero, how many times will a loop execute on the condition that i is not zero?
    2) Even if you fix number 1, where is there anything in that flow chart that limits number of inputs to 5?
    3) If a value of i is being input, how can you use i to control the number of times around the loop?
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  5. #5
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    Also, on the "sum = i + sum" box, you have two output branches though no decision is being made.

  6. #6
    Registered User
    Join Date
    Jun 2011
    Posts
    88
    If it was correct , which is is not, and someone inputted -1 for i, the loop would terminate.
    since for some reason you increment i.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with flowchart.
    By blur606 in forum C Programming
    Replies: 8
    Last Post: 11-12-2012, 08:14 AM
  2. Flowchart help
    By MstrKurt in forum C Programming
    Replies: 8
    Last Post: 01-17-2012, 01:23 AM
  3. Need help with flowchart
    By moey187 in forum C++ Programming
    Replies: 2
    Last Post: 04-14-2011, 04:25 AM
  4. flowchart. Help!!!
    By chema124 in forum C Programming
    Replies: 3
    Last Post: 12-10-2002, 10:00 AM
  5. Flowchart
    By ob1cnobe in forum C++ Programming
    Replies: 4
    Last Post: 06-05-2002, 12:03 PM

Tags for this Thread