You are on page 1of 1

import java.util.

*;
public class FruitsBasket.java {
public static void main(String[] args) {
Scanner fb = new Scanner(System.in);
Stack<String> baskets = new Stack<String>();

String a = "Apple";
String o = "Orange";
String m = "Mango";
String g = "Guava";
char eats;

System.out.println("Catch and eat any of these fruits : " +


"('apple' ,'orange', 'mango', 'guava')");
System.out.print("How many fruits would you like to catch? : ");
int catcher = fb.nextInt();
System.out.println("Choose a fruit to catch. Press A, O, M or G");
for(int x = 1; x <= catcher; x++) {
System.out.print("Fruit " + x + " of " + catcher + " : ");
}
}
}

You might also like