last day (14 days later) » 

4:47 AM
It just takes a while...
 
hi
i just want to know why this answer that does not cover the whole issue accepted and up voted
0
A: Number guessing program bug?

Kick ButtowskiThere are 2 Major Issue with your code: First: you failed to cast random variable in right away so the value for random value is always 0. The right style is: int random = (int)(Math.random() * 100); Second: your if structure is terrible: for example: if(guess >= 100 || guess <= 0){ ...

either this website is too crapy or i do not get the rules here?!!!!
 
A lot will come down to the individual's needs. When you're stuck with a problem for a while, the first piece of information which helps you resolve it is a great relieve, so they may not care about the other problems in there code
 
sorry blue screen
i am here
 
Some times people make bad choices, there's nothing we can do about. I have plenty of answers which vote higher then the accepted answer, but if the OP doesn't know how to solve there current problem, how are they to know what the right answer actually is...
 
as you see the if structre is main issue
if the op was even had right casting
 
4:53 AM
Both answers are valid by the way ...
 
he or she would not solve the prbolem
the accept one is just addressed one issue
me gave away the whole pciture
so tell me the difference again plz?
 
You both addressed the need to cast the random value to (int) correctly, but the structural change isn't going to ultimately change the flow of the program, while it looks strange, it's okay, it does the job.
Given the fact the first answer was made 6 minutes before yours, it would seem reasonable that the first shoud be accepted.
 
it is very unexpected from you
did you see the range?
the op wants between 0 and 100
 
I would might made a comment about using a loop of some kind
 
could you look at the range plz?
if(guess2 >= 100 || guess2 <= 0){
is this to you betwen 0 and 100?
 
4:57 AM
Yeah, so if the number is greater than 100 or less than 0, it's invalid, I might like to read it the other way, but it's still the same thing
Infact it should be guess > 100 || guess < 0 ... then is invalid...
 
form your first post, I saw come down and I read it calm down
it seems I took this so seriously
as you said people are different
and we can do anything about it
thank you for your valuable lesson and time :)
i really meant it
 
There's nothing wrong with your suggestion, there's plenty of different ways to handle the problem, sometimes, we can lead people to water, but we can't force there heads under it till they learn the lesson...despite my repeated efforts ;)
 
just curious do you have any children?
 
I have a gorgeous, bubble, bossy, two year old
 
boy or girl?
 
5:04 AM
And yes, that's required a lot of deep breathing to stay relaxed...girl
 
you aer very mature and calm person . It is huge pleasure to know you and talk to you :)
 
You should hear me swearing in the office...My wife often complains that I stomp about in the study...not always calm...but if you can't change it, don't sweat it ...
 
wowwwwwwwwwwww i gonna save this
 
Wise words, hard to live by ;)
 
your girl will be proud to have great dad like you.
trust me she is gonna tell you when she gets old
do you like tesla very much?
 
5:07 AM
I'm proud to have such a wonderful, curious little girl in my life ;)
 
and I am jealous lol do you like Tesla a lot?
 
Nikola Tesla?
 
Don't know much about him to be honest
 
why madprogrammer ?
I thought you got that from him cuz he was known as mad scientist
 
5:11 AM
My wife calls me the "Mad"...whatever I do...cause I get a crazy look in my eye...
But yeah, kind of a play on mad scientist ;)
 
haha so share tesla too
and you know why kick buttowski?
 
No idea
 
at least u know the meaing? lol
 
Ah, I see, bit of dare devil...
 
haha and if you break it down
kick is kick
butt is butt
lol
sir it was huge pleasrue to talk to you cuz you are very wise and awesome. I should admit I learned a lot from you.
hope I get this chance to talk to yo again
have fantastic and awesome time with your family sir
thank you
I should get going cuz I am about to pass out because of huger :)
have greatr time
 
5:19 AM
See around the boards ;)
 

last day (14 days later) »