Question
Write a program that computes the cost of flowers sold at a flower stand. Five kinds of flowerspetunia, pansy, rose, violet, and carnation are stocked
Write a program that computes the cost of flowers sold at a flower stand. Five kinds of flowerspetunia, pansy, rose, violet, and carnation are stocked and cost, respectively, 50, 75, $1.50, 50, and 80 per flower. Create an array of strings that holds the names of these flowers. Create another array that holds the cost of each corresponding flower. Your program should read the name of a flower and the quantity desired by a customer. Locate the flower in the name array and use that index to find the cost per stem in the cost array. Compute and print the total cost of the sale.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started