🔒 Closed Java Guessing game

Status
Not open for further replies.
Hello mga paps sana mahelp niyo ako...
gagawa kasi kami guessing games na ganito magiging out put
1648483845096.webp

Dito po ko mga nahihirapn
1. Pano po kaya magging definite yung number from 1-50 kasi dapat pag 51++ na mag "o-out of range" na po dapat pero sa code ko tuloy tuloy lang and "too high try again pa din " yung nag rurun (tho i think lalagyan pa to ng try catch pero di ko alam pano gagagwin ghahah)

2. pano po kaya yung sa try and catch kasi narun ko na and gumagana naman po pero nag bubuild succesful na siya agad so hindi mabibilang yung attempts nung user.....

sana po nagegets niyo ko hehehhe


eto na po yung code ko

1648484273243.webp
 
1. condition if or else input value > to 50 print out of range
2. pwede siya kahit wala try catch using for loop kada loop mag add ng mag add as kung ilang attempts na.
 
1. Ayusin mo muna structure ng code mo..Di siya readable kaya malililito ka sa logic..
2. Define the proper algo.
Code:
a. Get input
b. Generate random #
c. Check the range if in range or output range
d. if random # is equal to input
   show match message
e. check of input is greater than random #
    show "Guess lower #"
f. otherwise,
   show "guess higher"
 
Status
Not open for further replies.

About this Thread

  • 3
    Replies
  • 1K
    Views
  • 4
    Participants
Last reply from:
ewe we

Trending Topics

Online now

Members online
799
Guests online
1,200
Total visitors
1,999

Forum statistics

Threads
2,286,904
Posts
29,041,069
Members
1,217,234
Latest member
jordy0943
Back
Top