I posted this question before. The assignment was: write a Java method if the first parameter is less than the second parameter add the two and print the result ten times.

How do I write the result 10 times as a loop? This is what I've got but I have a ton of errors that I can't figure out.

public class IfHomeworkThree
{

public static void main(String args[])

{
int x1;int x2;
x1=10;
x2=2;
if (x1>x2)
System.out.println(x1-x2);
}

for(int i=8;i<10;i++){
System.out.println("Count is: " + i);
}
}
}

Similar Questions
  1. I posted this question before:How would I put this into one program? These are the directions: Write a method that takes two
    1. answers icon 5 answers
    1. answers icon 1 answer
  2. Hi,I have the following assignment: "Write a Java application program using Eclipse to do the following. Write a program that
    1. answers icon 0 answers
  3. How would I put this into one program?These are the directions: Write a method that takes two parameters. If the first parameter
    1. answers icon 0 answers
more similar questions