import java.io.*;
import java.util.*;
public class mine{
public static void main(String args[])throws IOException{
BufferedReader min = new BufferedReader(new InputStreamReader(System.in));
Scanner in=new Scanner(System.in);
int choice, quanti=0, loop = 1, counter = 0;
String iname[]= new String[loop];;
int quant[]= new int[loop];
if(loop-1==counter)
{
do{
loop+=1;
System.out.println(counter);
System.out.println(loop);
System.out.println("----------------------------- ");
System.out.println("Choose the desired action ");
System.out.println("----------------------------- ");
System.out.println("[1]Enter items ");
System.out.println("[2]View Inventory ");
System.out.println("[3]Exit ");
System.out.println("----------------------------- ");
choice = in.nextInt();
if (choice == 1)
{
for(int x = 0; x <loop;x++) {
if (iname[x]==null|| iname[x]=="")
{
System.out.println("Enter item name:");
iname[x]= min.readLine();
System.out.println("Enter quantity: ");
quant[x]= in.nextInt();
counter+=1;
break;
}
if (iname[x]!=null|| iname[x]!="")
{
counter+=1;
break;
}
else
{
continue;
}
}
}
if (choice == 2)
{
for(int b =0; b<counter;b++){
System.out.println(quant[b]);
System.out.println(iname[b]);
}
}
}
while(choice!=3);
}
}
}