Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
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
  • 33,101 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