tip calculator

why doesnt this work

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>

using namespace std;

int main()
{
    double bill;
    double percent;
    double tip;
    
    cout << "enter the price of you bill: ";
    cin >> bill;
    cout << "now enter the percent you want to tip your waiter in decimal form: ";
    cin >> percent;
    
    tip = bill / percent;
    cout << "if you want to tip your waiter 20% you should pay him " << tip;
    
    system("pause");
    return 0;
}
never mind i fixed it
Topic archived. No new replies allowed.