need help creating a code

hey guys, i need help and ideas creating a code for pizza shop application, the user must choose pizza size, and how many they want (5max), and select toppings, the application will then display the details of their order plus a 10% discount if the order is over $50.

anyone can help me create this application? Thanks :)

prices for small, med, large and extra large are 10,20,30, and 40
there is 3 topping each cost 5.

Last edited on
What have you tried?
i'm fairly new to programming so i need suggestions. :)
anyoneeee??????
closed account (oGwfSL3A)
We cant just do your homework for you, if it is. Can uou atleast make an attempt?
5 bucks for EACH topping? So a small pizza with 3 toppings is 25 bucks? Is this normal pricing in US of America?!!!

@OP - Are you familiar with std::cout and std::cin? Do you know how to use int variables and how to add them together? Do you know how to use if/else? We will not do your homework for you, but to give some general advice, we need to know, what you know. This is not a forum for getting homework done by other people. =/
closed account (G30GNwbp)
here is some fake code--now all you need is to write some functions.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream>
#include <vector>

int ask_what_size_of_pizza(std::vector<std::string> &size);
int ask_how_many_toppings(std::vector<std::string> &toppings);
void print_order_and_price(std::vector<std::string> &size_str, std::vector<std::string> &topping, int size, int top_count);

int main()
{
    std::vector<std::string> toppings;
    std::vector<std::string> size_str;
    std::cout<< "what size pizza";
    int size = ask_what_size_of_pizza(size_str);
    std::cout<< "how many toppings";
    int top_count = ask_how_many_toppings(toppings);
    print_order_and_price(size_str, toppings, size, top_count);
    return 0;
}
Last edited on
i'll do your program for fun but I wanna know how "advanced" it needs to be. Does this program only do 1 order before terminating or does it run for as long as the user inputs additional orders of pizza?
@Cody, hey, a maximum of 5 pizzas can be ordered at one time.

and toppings are cheese, mushrooms and peppers, the user can select all or none.
Last edited on
ight. when do you need it by?
Last edited on
anytime thxx :)

hey btw, here the messagebox errors
Please enter a whole number

Please select a size

Number must be from 1 to 10

and order details in listbox example:

Pizza order 5 large
Plus 2 extra toppings on each
regular price: 120 dollars
10% discount: 10dollars

final total: 110 dollars
Last edited on
Topic archived. No new replies allowed.