2 Replies - 427 Views - Last Post: 19 July 2011 - 09:07 AM Rate Topic: -----

#1 arv18   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 08-December 10

CAN SOMEONE KNOW HOW TO DO THIS JAVA GUESS GAME IM NOT GOOD AT THIS ..

Posted 19 July 2011 - 08:16 AM

A radio station gives its caller a chance to win for a contest which is all about guessing the number in a list of 15 randomly generated numbers from 1 to 100. The first group of randomly-generated numbers are: 42, 68, 35, 1, 17, 22, 79, 59, 63, 5, 20, 14, 82, 29, and 2. The station will wait for the first five callers who could guess a number in the list to win a prize. The first caller who gives the right guess wins P500, second caller wins P400, third caller wins P300, fourth caller wins P200 and the fifth caller wins P100. In order to easily manage the randomly-generated numbers, store them in an array. Searching for the callerís guess from the list of numbers will be done using binary search, thus the list must be sorted first using your preferred sort algorithm. Once there will be five callers who win in the first group of 15 numbers, the program will again list a new set of 15 randomly-generated numbers for the next batch of the contest. Guessing game is then again open for callers.

Is This A Good Question/Topic? 0
  • +

Replies To: CAN SOMEONE KNOW HOW TO DO THIS JAVA GUESS GAME IM NOT GOOD AT THIS ..

#2 ipushmycar   User is offline

  • D.I.C Regular

Reputation: 86
  • View blog
  • Posts: 390
  • Joined: 29-August 10

Re: CAN SOMEONE KNOW HOW TO DO THIS JAVA GUESS GAME IM NOT GOOD AT THIS ..

Posted 19 July 2011 - 08:17 AM

What have you tired... We will not give you code.

Why not start by creating an array of size 15 and filling it with random numbers. Test to make sure that there are not multiple numbers since that would not make sense. Try to get that working and post your code if you need help.

This post has been edited by ipushmycar: 19 July 2011 - 08:26 AM

Was This Post Helpful? 1
  • +
  • -

#3 arv18   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 08-December 10

Re: CAN SOMEONE KNOW HOW TO DO THIS JAVA GUESS GAME IM NOT GOOD AT THIS ..

Posted 19 July 2011 - 09:07 AM

View Postipushmycar, on 19 July 2011 - 08:17 AM, said:

What have you tired... We will not give you code.

Why not start by creating an array of size 15 and filling it with random numbers. Test to make sure that there are not multiple numbers since that would not make sense. Try to get that working and post your code if you need help.

thanks :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1