sabi
12-04-2011, 08:11 AM
im writing a program that asks the user to enter 5 numbers and then when it has all 5 numbers it should display all the numbers at the end, but i cant make it work so please help me out.
import java.util.Scanner;
public class Lab
{
public static void main(String[] args)
{
Scanner keyboard = new Scanner(System.in);
for(int count = 0; count < 5; count++)
{
System.out.println("Enter a integer.");
int numbers = keyboard.nextInt();
}
}
}
import java.util.Scanner;
public class Lab
{
public static void main(String[] args)
{
Scanner keyboard = new Scanner(System.in);
for(int count = 0; count < 5; count++)
{
System.out.println("Enter a integer.");
int numbers = keyboard.nextInt();
}
}
}