Sign in with
Sign up | Sign in
Your question

NEED help with a java assignment!

Last response: in Applications
January 6, 2013 9:08:18 PM

I need help making a java program that allows the user to enter two numbers, and the program should list multiples of the first number to check if the second number is a multiple of the first. If it is, then the player gets +2 score, and if its not then the user gets -1, the user starts of the 0 score. The loop breaks when the value of the multiple exceeds 1000, and the program is supposed to ask the user to play the game as many times as they want as long as they have a POSITIVE score.

Due tommorow :|

Can anybody help me start?

That would be great! Thanks.

More about : java assignment

January 6, 2013 9:16:15 PM

Please post what you have written so far so we can see your work, we should not do your assignment for you.
January 6, 2013 9:18:36 PM

import javax.swing.*;
class GuessMultiple{
public static void main(String str[]){
int value = 0;

while(value < 100){

if(i==10)break; //terminate loop if is 10
System.out.println("i: " + i);

System.out.println("Loop complete.");


That's what I got so far, I don't need you to do it for me, just need some tips to start off and keep going .
Related resources
January 6, 2013 9:45:47 PM

a b L Programming
January 7, 2013 5:03:58 AM

I'd have to say this is a pretty simple assignment, so if you don't know how to go about it then you are not clear on the fundamentals of Java and programming in general. Hints or solutions from people here are not going to solve this. Talk to your tutor and explain your problems to him. (S)He knows your abilities and your expected level of knowledge and understanding and can give you the appropriate guidance.

The purpose of assignments is not to score points but to think about problems and learn by so doing. Letting someone else do the thinking for you is not productive.
November 19, 2013 6:04:24 AM

Giving the code will not help you learn the concepts. I tutor Java using web-conferencing and provide a free lesson for an hour. You will learn certain Java concepts and will probably be able to do some of your assignments on your own. A blog on object oriented programming concepts i have written is at