Thanks for replying. I had checked the java operator and they're the same?
quote from java website link you posted
equality == and !=
Type: Posts; User: destinedtale
Thanks for replying. I had checked the java operator and they're the same?
quote from java website link you posted
equality == and !=
for(int i=0;i<20;i++){
if(i>randomPosition -4 && i<randomPosition +4 && i!=randomPosition) i don't understand this part. Especially when i change to != to ==, the code will run wrongly,...
Would like to thank DuncanS, Cornix and mod for the help.
Although i got the output i wanted, i still need some clarification. Based on the question, shouldn't the code be
if num2 and num3 are...
here's the problem. If i complete the java code for the following question. I'm getting "Don't know" respond even though i'm suppose to get a "Two larger" respond from the system.
The question...
I'm suppose to get the output of two larger if i enter 2 for first number, 15 for second and 34 for third.
using the if else method. But instead i'm getting don't know which is not the result the...
write a program to ask the user to enter 3 numbers called num1, num2 and num3. The program should print "Two larger" if num2 and num3 are both larger than 15. Else if num2 is between 5 and 10,...
Sorry but i don't understand. Is there anyone who're willing to write a similar java code so i can learn better. Basically the for loop is used because the question asked me to generate a series of...
Assume that vehicles are going through a two-way traffic intersection. There are three types of vehicles: car, motor bikes and trucks. Generate a series of 10 random integers, between 1 and 3,...