You will be making a pizza ordering program. In this program
You Are Eligible For 15% Discount This Month!
You will be making a pizza ordering program. In this program there will be two arrays, one a character array that houses a single character for the size of the pizza (s, m, l, x for xl.). The second array will be a double which will house the pizza prices. Both of the arrays will be in matching order. In other words the smallest size pizza will be index 0 and the lowest price will also be index 0. That way if you only want to pull up one pizza and its price you only need to use one index value. Besides the first two arrays you will need to make four variables. A character variable which will be used for the input from the user getting the size of the pizza, another character variable which will be used to output the size of the ordered pizza to the console, a double used to output the pizza price to console, and a boolean variable set to false called pizza Size Found that way when you do find the correct size you can set the value to true and since the boolean turns true it will output the size and price to the console.
Leave a Reply
Want to join the discussion?Feel free to contribute!