Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Visual Logic Help


  • Please log in to reply

#1
mduran7599

mduran7599

    New Member

  • Member
  • Pip
  • 1 posts
I am at the end of my term in CIS115 in devry and i am having some problems with my last 2 questions of homework before the final if i could get any help at all it would be greatly appreciated.

here they are

High-Low: Write a program that allows the computer to randomly generate a number between 1 and 1000. The user will then enter a guessed value. If the guessed value is lower than the secret number, the computer should tell user to “enter a higher value”. If the guessed value is greater than the secret number then the computer should tell the user to “enter a lower value”. This process should continue till the user guesses the secret value. Then the final output should say: ” CORRECT! You guessed the secret number which is ….” “It took you # of guesses” (Hint: you need to use while loop for the guessed value. Also you need to create a counter to count the number of guesses)

Password: Write a program that maintains two parallel arrays. The first array holds five usernames, and the second array holds five passwords. The program should read the five usernames and password pairs, and then store those values into the parallel arrays. After the arrays have been loaded, the program should behave as a login screen, prompting for username and password. The program should respond appropriately with one of three output messages. If the username does not match one of the values in the username array, then the message should be” Username not found.” If the user name is found in the user name array, but the password does not equal the parallel value in the password array, then the message should be ” Username and password do not match.” If the username is found and the password matches the parallel value in the password array, the message should be “Access granted” .
  • 0

Advertisements


#2
Metallica

Metallica

    Spyware Veteran

  • GeekU Moderator
  • 32,894 posts
Hi mduran7599,

I think you will find nobody here is inclined to help you with your homework.
Your teacher should be happier with a failing attempt made by yourself then with a working program that you hardly understand.

Hint:
Random(5) A random number between 0 and 4
Random(100) + 1 A random number between 1 and 100


Regards,

Pieter
  • 0

#3
DeepPurple

DeepPurple

    New Member

  • Member
  • Pip
  • 1 posts
how about a hint as to how to set up the two arrays. Someone gave me this program and I am not doing this for a school but my self and the password problems looks interesting.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP