What's new

Help Java Guessing game

JakeMosby

Elite
Joined
Apr 22, 2019
Posts
2,232
Solutions
7
Reaction
1,187
Hello mga paps sana mahelp niyo ako...
gagawa kasi kami guessing games na ganito magiging out put
1648483845096.png

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.png
 

Attachments

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.
 

vhin le

Eternal Poster
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"
 
Top