Francis Oswald

Greenhorn
+ Follow
since Jun 20, 2020
Cows and Likes
Cows
Total received
1
In last 30 days
1
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
3
Given in last 30 days
3
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Francis Oswald

Piet Souris wrote:@OP

in your opening post, you ended with a nice code snippet, using a TreeSet. What happened to that snippet?



I'm messing around with Java for only about 4 months now and couldn't make this thing work with a TreeSet constructor. Maybe at some time in the future.
2 weeks ago
Working code:

2 weeks ago
It's done. i did it with Arrays and it's working now. Mission completed.
2 weeks ago
I know this code is a big mess but here's the complete thing. The new errors I'm getting are: "the method min (int, int) in the type math is not applicable for the arguments (int, Random)" and "count can not be resolved to a variable".



2 weeks ago
Here's the code:

2 weeks ago
I've tried a new approach but now I get the error "the method min (int, int) in the type math is not applicable for the arguments (int, int[])". It wants me to change type randomint to int....which would destroy my whole concept again. Any ideas?
2 weeks ago

Norm Radder wrote:Please explain.  What does the code do now?  What do you want it to do differently?



Well it does nothing. I get error messages because of variable randomNumber. I want this thing to generate 100 out of 500 (500 max value) random numbers and summarize them and count them and also pick out the lowest and the highest number (from the pool of randomly generated numbers)....all in one go.

2 weeks ago
Thanks for the input so far but......why is this not working now? I'm having a really hard time understanding loops:

2 weeks ago
Hi again,

The plan was to write a code that lists 100 numbers (1-100) in a row....and then automatically:

-- Sum them up (number + number....)
-- Count the numbers (100)
-- Pick out the lowest number
-- Pick out the highest number

Everything works just fine but now I want to do the same thing with randomly picked numbers (100 out of 500). Here's what I have:

             

I would like to use this random generator to the job but I can't interconnect the two codes:



Thanks for any advice.






2 weeks ago


I guess it works now. Java forced me to but a ";" between the first bracket and "element". Why this?
3 weeks ago
Hello,

how can I convert this increasing sequence into a for loop? I've tried a bit but can't get it done. Thank you.

3 weeks ago