Fri Nov 19, 2010 4:49 am
Sun Nov 21, 2010 8:39 pm
Sun Nov 28, 2010 2:24 am
Sun Nov 28, 2010 3:25 am
Sun Nov 28, 2010 3:36 am
import java.util.Scanner; //import scanner class
class loopsforumhelp
{
public static void main(String[] args)
{
int NumOne = 0; //inputted number one
int NumTwo = 0; //inputted number two
Scanner keyboard = new Scanner(System.in); // holds input
for(int onecounter = 1;onecounter <= 2; onecounter++)
{
if(onecounter == 1)
{
System.out.println("Lowest Number First.");
System.out.println("Enter Number " + onecounter + " : ");
NumOne = keyboard.nextInt();
}
if(onecounter == 2)
{
System.out.println("Enter Number " + onecounter + " : ");
NumTwo = keyboard.nextInt();
}
}
for(int twocounter = NumOne;twocounter <= NumTwo;twocounter+2;)
{
System.out.println(twocounter);
}
}
}
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.