JAVA PROGRAM USING A WHILE STAMENT

I NEED HELP WRITING A JAVA PROGRM

Page 1 of 1

1 Replies - 1948 Views - Last Post: 24 September 2005 - 06:50 AM Rate Topic: -----

#1 big-bad-dave  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 23-September 05

JAVA PROGRAM USING A WHILE STAMENT

Post icon  Posted 23 September 2005 - 08:39 PM

I AM WRITING A PROGRAM FOR A LAB AT SCHOOL CALLED THE EASTER EGG HUNT I HAVE GOTEN THIS FAR BUT I NEED SOME HELP IT IS DUE SUNDAY BY E-MAIL CAN ANY ONE HELP ME THIS IS WHAT IT SHOULD PRINT OUT THE GIRLS SCORED 15 POINTS AND THE BOYS SCORED 10 THE GIRLSA ARE THE CHAMPIONS THIS PROGRAM SHOULD USE THE WHLIE AND THE NESTED IF/ELSE LOGIC HEAR IS MY PROGRAM

Attached File(s)


Is This A Good Question/Topic? 0
  • +

Replies To: JAVA PROGRAM USING A WHILE STAMENT

#2 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,506
  • Joined: 12-July 02

Re: JAVA PROGRAM USING A WHILE STAMENT

Posted 24 September 2005 - 06:50 AM

Fist and foremost, you will have to identify the if/else structure...there are many nested ifs but no clear indication which if statement the else goes with. Can you delineate by using braces (or just specify which if the else goes with, and the two lines of code that follow the final if in the first block)? That would give us a better idea of the structure. Secondly, you are declaring integers, but assigning those integers string values...unless they are converted to numbers, any mathematical operations performed on them will not be successful. Thirdly, you have declared a scanner class, but are not actually scanning anything in to the program (although you may be hardcoding for the time being, but again, the integers as strings will cause problems). You also seem to be using double assignments at the end of your comparitive statements...not that this is illegal, but is it what you meant to do?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1