repl.it
@ArlanPereira/

Flowchart Example 3

C++

No description

fork
loading
Files
  • main.cpp
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>
#include <string>
using namespace std;

int main() {
  cout <<"----------Begin Progtam---------" << endl;
  cout << "Pizza Menu" << endl;
  string pizzas []= {"Ham and Oineapple", "Tuna and Olives"};
  string vegPizzas []= {"Gardiniera", "Margherita"};
  string option;
  cout << "Would you like to see the vegetarian option" << endl;
  cin >> option;
  if(option == "y"){
    for(int i - 0; i < 2; i ++){
      cout << vegPizzas[i]
    }
  }else{
    cout << "Margherita\n" "Ham and Pineapple\n" "Gardiniera\n" "Tuna and Olives"<< endl;
  }
  cout << "----------End Of Program----------";
}