Professional Documents
Culture Documents
Find and Correct Six (6) Errors in The Code
Find and Correct Six (6) Errors in The Code
// This program uses two arrays to record the names of 5 types of pizza
// The program then finds the best and the worst selling pizzas
#include<iostream>
#include<string>
int main()
int name[ARR_SIZE]=["Pepperoni","Prosciutto","Vegetarian",
"Sausage","Supreme","Mozzarella"];
string worstseller_name, bestseller_name; // The sale numbers of the best- and worstseller
cout << "Enter sales for " << name[i] << ": ";
// Make the first element in name[] the bestseller and the worstseller name
// Make the first element in sales[] the bestseller and the worstseller sales amount
cout << "The bestselling pizza is " << bestseller_name << " with the sales of "
cout << "The worst selling pizza is " << worstseller_name << " with the sales of "