// Initialize a Scanner
static Scanner s = new Scanner(System.in);
public static void main(String[] args) {
// Store a number from user input
System.out.println("Enter a number")
int firstNum = s.nextInt();
// Print "foo" for the amount stored
for (int i = 0; i < firstNum; i++) {
System.out.println("foo");
}
// Store another number from user input
System.out.println("Enter another number")
int secondNum = s.nextInt();
// Print "foo2" for the amount stored
for (int i = 0; i < secondNum; i++) {
System.out.println("foo2");
}
// Store yet another number from user input
System.out.println("Enter yet another number")
int thirdNum = s.nextInt();
// Print "foo3" for the amount stored
for (int i = 0; i < thirdNum; i++) {
System.out.println("foo3");
}
}