Hey Guys
Cheers for the info I will check them out.
Type: Posts; User: Faz
Hey Guys
Cheers for the info I will check them out.
Hey guys
I'm currently developing a gym membership system for my aunt. I'm using Java and mySQL as the database. I'm getting fairly close to finishing it all I need to do is add a few analytical...
Could you tell us what it's supposed to do and what it's actually doing at the moment?
I'm bamboozled I have to say. If the order of cards is the most important have you thought about ordering them? For a video poker game I wrote I decided to create a duplicate of the hand that was...
It's Fantastic.
Let me hazard a guess as to what they do when n = 6 the first prints 1,2,3,4,5,6 the second prints 1,4 the third prints1,4,5,8 or something like that i is just an integer to keep track not the...
I just spotted that by chance from now on don't tell us what the output wasn't tell us what it was. We can't tell much just from what you expect the programme to do can we?
Did I say print out i?
So what was the output? You have gallons as an int but you are passing it a double.
Well you tell us what is actually happening now?
The reason you only got 1 4 is because you are setting the loop to run until N > n while what you want to to is run it n times I would recommend you use a for loop.
for(int i = 1; i <= n;...
Ah OK well then I see what you were doing with your code now, I think.
But your pseudocode is quite bare you need to think about how to get each digit, if you knew the length it's easy enough but...
OK first of all see what happens when you change
distance = miles;
for
miles = distance;
OK what are you being asked to do? Where are you setting n and what determines it? upByThrees(4) What does this tell you? Is that your whole code? Why would you want to get it to print out x number...
Actually you only need to go to the square root of 50,000 so I think 224 (so that's where they 223 came from)
That came out as p2 but it's actually p squared.
You wouldn't have the other JFrame to always be on top too would you?
EDIT:
Also what version of Java are you using?
Welcome lad.
Haha classic line.
But yeah we need a bit more then "a mess" tell us what's happening maybe try to do some of your own debugging with println statements to see what is happening in what order.
That would be a simple but not foolproof way of doing it. If you went through and set all mulitples of 2, 3,5,7,9,11 and 13 you would get most primes but there would be some missing.(EDIT: sorry I...
OK perhaps if you explained a bit better what exactly you are trying to do. I am guessing you want to find the sum of the digits of an integer not the sum of integers of a digit :P first of all...
I'm a bit confused as to the game I mean what constitutes a good hand? I mean you say 12345 is deadly would 23456 or 01234 be stronger and how strong would say 66666 or 00000 be?
I don't think that would make a difference. Norm is right the logic you are using to check if a number is prime is flawed I just ran a similar logic in VBA in excel to show this.
9000
9006
9009...
It's a general rule of thumb that these things should be solved in public so people have a chance of finding it without asking the same question later on.
You don't need an array here you just...
Yes that should do it but I was rather hoping he'd figure it out himself so that he understands why that is.
OK so what exactly is the problem you're having? Is it compiling with or without errors? If without what is happening that you don't expect? And what exactly is this code for?
public static...