Jump to content

Visual Logic Help?

BakaWolf

I was wondering if anyone could help me with a visual logic flowchart. 

 

Using arrays...

  1. Allow a user to enter 50 numbers, then display them in reverse order of their entry.
  2. Allow a user to enter 14 numbers, then display each and their difference from the total of the numbers entered.

 

Unfortunately I don't know how to do an input loop or arrays since our teacher doesn't actually teach. So any help would be greatly appreciated. I'll also probably will need help with 

 

Using a flowchart write a program that does the following:

  • Design the logic for the game Hangman, in which the user guesses letters in a hidden word.
  • Store the letters of a word in an array of characters.
  • Display a dash for each missing letter.
  • Allow the user to continuously guess a letter until all the letters in the word are guessed correctly.
  • As the user enters each guess, display the word again, filling in the guessed letter if it was correct. For example, if the hidden word is computer, first display a series of eight dashes: --------. After the user guesses p, the display becomes ---p----.
  • Make sure that when a user makes a correct guess, all the matching letters are filled in. For example, if the word is banana and the user guesses a, all three a characters must be filled in.
Link to comment
Share on other sites

Link to post
Share on other sites

Here's an example flowchart that is using a loop and an array. It should give you the ability to start working out the arrays section.

 

fill2array.jpg

 

Also, this example shows input and output.

 

flowchart_input_output.png

Link to comment
Share on other sites

Link to post
Share on other sites

That first flowchart shows a while loop inside a do while loop which is just kinda weird and wouldn't properly handle j being initialized to > 9.

1474412270.2748842

Link to comment
Share on other sites

Link to post
Share on other sites

That first flowchart shows a while loop inside a do while loop which is just kinda weird and wouldn't properly handle j being initialized to > 9.

 

I never really looked at it closely but yeah, you're right, it's a weird example. It still demonstrates a loop with an array though so I'll leave it there. I can't be bothered to find a better example right now.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×