Pages: 1
You are viewing a post by mystic rain. View all 4 posts in Hello there I need help ): I'm still a beginner when it comes to java o.o and so I still have this kind of difficulty in making such kind of java programs... here's the little background of my progra.
5.00;
price[3]=15.00;
price[4]=5.00;
int numberOfItems=0;
double total=0.0;
System.out.println("What is your name?");
String yourName=inputted.nextLine();
System.out.println("\nWelcome to Rain's Store "+ yourName);
System.out.println("Items:");
for(int y=0;y<x.length;y++){
System.out.println(x[y] + " = "+ price[y]+"pesos");
System.out.println("your chosen item:");
String yourItem=inputted.nextLine();
for(int y=0;y<x.length;y++)
{
if(yourItem==item[y])
{
System.out.println("How many"+ item[y]+ "do you like?");
int numberOfItems=lol.nextInt();
for(int x=1;x<=numberOfItems;x++)
double total=total + price[y];
break;
}
break;
}
}
}[/quote]
corrections about my program are well appreciated or in other words your help.