Program Problem

How do I go about setting up the rental upgrade part of program. Here is what I need to do:

The program will try to sell the next more expensive car if S or O is entered, by quoting the charge for the next more car less 5% discount on the entire price. For example, if the user asks foe an 'O' quote, the upgrade is to 'S' or upgrade to 'P' if asked for 'S'. Here is what I have so far.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#include<iostream>
#include<cctype>
using namespace std;

int main()
{
   
   char carType;
   int A, B, C;
   char keepgoing;
   char condition; 
   double miles, per_miles,upgrade;
   double days, per_days,new_char;
   double price, fees, charges,discount;


   
   do
   {
   
   do
    { 
      cout<<"Which car are you shopping for? (enter A, B, C)?"<<endl;
      cin>>carType;
      
      }while (carType != 'A' && carType != 'B' && carType != 'C' );
      
      

    cout<<"What condition? (S, O, or, P)"<<endl;
    cin>>condition;
     
    if ((condition !='S') || (condition !='O') || (condition !='P'));
     
    
    else
      cout<<"Please enter the correct response"<<endl;
    
    
    
    cout<<"How many miles?"<<endl;
    cin>>miles;
    cout<<"How many days?"<<endl;
    cin>> days;
    
         cout.setf(ios::fixed);
         cout.setf(ios::showpoint);
         cout.precision(2);

      
      
         switch(carType)
      {
       
         case 'A':
         
         per_miles = miles * 0.10;
         per_days = days * 29.95;
         price = per_miles + per_days;
         
                  
         break;
         
         case 'B':
         
         per_miles = miles * 0.15;
         per_days = days * 35.95;
         price = per_miles + per_days;
         
         
              
         break;
         
         case 'C':
         
          per_miles = miles * 0.20;
         per_days = days * 39.95;
         price = per_miles + per_days;
         
                           
               
         break;
         
         default:
         cout<<"You entered an incorrect car choice"<<endl;
         }
         
         if(condition =='O')
         {
            fees = price * 0.10;
            charges = price - fees;
         
         cout<<"The charges are?"<<charges<<endl;
         
         
         
         }
         else if (condition == 'P')
         {
            fees = price * 0.10;
            charges = price + fees;
                      
         cout<<"The charges are?"<<charges<<endl;
         
        
         
         
         }
         else
         {
         cout<<"The charges are?"<<price<<endl;
         }
         
               
         cout<<"Do you want another one (y/n)?"<< endl;
         cin>>keepgoing;
         
         }while (keepgoing == 'Y' || keepgoing == 'y');
         
         cout<<"Thank you for using this program. Goodbye."<<endl;
         }
                                        
What's the problem? Have you a question?
closed account (jwkNwA7f)
@condor
OP wrote:
How do I go about setting up the rental upgrade part of program. Here is what I need to do: ...
Topic archived. No new replies allowed.