JAVA Flower counter program
<p>I have to write a program that uses 2 arrays. The first array stores 5 flower names, and the 2nd stores the price of each flower. </p>

<p>The user will input what kind of flower and how many and the program will output the cost. I'm having trouble outputting the associated cost of the particular flower with the particular cost. </p>

<p>I want to use 5 if statements, but am having trouble with the flowers strings. Any suggestions?</p>

<p>Here's my code so far:</p>

<pre><code>import java.util.Scanner;

public class FlowerCounter
{
    public static void main(String[] args)
    {

        String[] flowers = new String[5];
        double[] price = {.50, .75, 1.50, .50, .80};

        Scanner keyboard = new Scanner(System.in);
        System.out.println("What kind of flower would you " +
            "like to purchase? \nPetunia, Pansy, Rose," +
            " Violet, or Carnation?");

        String index = keyboard.nextLine();
        System.out.println("How many " + index +"s" + " would you like?");
        int count = keyboard.nextInt();

        double total = count * price.length;
        System.out.println("The cost for " + count  +  index  + " is " + total);             
    }        
}
</code></pre>
