0

Ok soo i'm completely lost, i have taken java 1 and 2 in school but didn't learn a thing. Please help me with some quick and easy code .

Using a boolean array with 10000 elements set to "true" write the following program in Java now.

1. Set an integer variable j to 1.
2. Find the first value of j greater than the present value and smaller than 100 for which the array element is true.
3. Using this value of j set to false all the array elements from j*j to 10000 in increments of j.
4. Repeat steps 2 and 3 until no value of j exists that satisfies the constraints of step 2.
5. print the values of j greater than 1 for which the array element is true and the remainder when j is divided by 10 is 7.

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by llemes4011
0

Waffletaco: Welcome to to Daniweb! I'm sorry you didn't learn anything in school, but we can't just give you code. This isn't a code bank, it's a discussion community. If you have a question about how something works, ask, but don't ask for a complete program, it just makes people angry.

corybaxrer: If you have a question, start your own thread, don't go posting questions in others threads. As for your question, I doubt anyone here is willing to teach you, it isn't something that can be done ...quickly... If you wish to learn how to build an application, visit the Java Trail, and find the correct section.
Java Trail

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.