HELP !! INPUT AND OUTPUT TEXT FILE PROBLEMS

We have a proposal presentation tomorrow and the program we made is a hotel advisory. And there is a problem in my program tho it's working when I try to Run it. In our Program we have a input text file. So this is my main problem . I want to see the results of cout << "\n\nEnter The Number Of Travlers:\n"; and cout << "\n\nHow much is your budget? (it is in the void area):\n\n"; in the output text file. We were only using a notepad .. Can you kindly check our program.. We really want to see the results of that in the Notepad . Thank you

Sorry if it's too long but you can just look at the Void palawan
THANK YOU VERY MUCH
Last edited on
This is the whole Program
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#include<iostream>
#include<string>
#include <fstream>

using namespace std;
void Palawan();
void Baguio();
void Bicol();
void Cebu();
void Vigan();
void Boracay();
void Baler();
void Bohol();
int main(){
    system("COLOR f9");
    cout<<"\n================================================================================";
    cout<< " \n\n\n\n                     Welcome to 202 Hotel Advisory \n\n\n";
    cout<< "   We aim to help you find the most suitable Hotel that fits your budget. \n";
    cout<< "   This Program service are free to users, who provide most of the content,\n"; 
    cout << "        and the website is supported by an advertising business model\n\n\n\n";
    cout<<"\n================================================================================";
    system("PAUSE");
    system("cls");
    system("COLOR f0");
    cout<< "\n             Please provide first the following information                   \n\n";
    string firstname, lastname, name;
    int contactnumber;
    system("COLOR f0");
    cout<<"\n\nYour Firstname: ";
    cin>>firstname;
    system("COLOR f0");
    cout<<"\n\nYour Lastname: ";
    cin>>lastname;
    name=firstname+ " " +lastname;
    system("COLOR f0");
    cout<<"\n\nContact Number: ";
    cin>>contactnumber;
    system ("cls");
    cout<<" \n\n                              Hello! "<<name;   
    cout<< "\n\n";
    cout<< "              202 Hotel Advisory is now ready to guide you ";
    cout<< firstname<<endl;
      
    ofstream outfile;
    outfile.open("customerinformation.txt",ios::app);
    
    outfile << " Customer Information \n";
    outfile << firstname+ " " +lastname << endl;
    outfile << contactnumber << endl;
    outfile.close();
    
    
    int a;
    char x;
    do{
    system("COLOR 75");
 	cout << "\n";	 
 	cout << "         **********************************************************   \n";      
	cout << "         **********************************************************   \n";                                     
	cout << "         ***              Choose your Destination               ***   \n";
	cout << "         ***                                                    ***   \n";
    cout << "         ***       1. Palawan                                   ***   \n";
    cout << "         ***       2. Baguio                                    ***   \n";
    cout << "         ***       3. Bicol                                     ***   \n";
    cout << "         ***       4. Cebu                                      ***   \n";
    cout << "         ***       5. Vigan                                     ***   \n";
    cout << "         ***       6. Boracay                                   ***   \n";
    cout << "         ***       7. Baler                                     ***   \n";
    cout << "         ***       8. Bohol                                     ***   \n";
    cout << "         ***       9. EXIT                                      ***   \n";
    cout << "         ***                                                    ***   \n";
	cout << "         **********************************************************   \n";
	cout << "         **********************************************************   \n";      
	system("PAUSE");
    cin>> a;
    if (a==1) 
    {outfile << " Palawan " <<endl;}
    else if (a==2) 
    {outfile << " Baguio " <<endl;}
    else if (a==3) 
    {outfile << " Bicol " <<endl;}
    else if (a==4) 
    {outfile << " Cebu " <<endl;}
    else if (a==5) 
    {outfile << " Vigan " <<endl;}
    else if (a==6) 
    {outfile << " Boracay " <<endl;}
    else if (a==7) 
    {outfile << " Baler " <<endl;}
    else if (a==8) 
    {outfile << " Bohol " <<endl;}
    else
    {outfile << "" <<endl;}
    outfile.close();
    switch (a){
           start:
           case 1:
           cout<< " Palawan \n";
           Palawan();
           break;
           
           case 2:
           cout<< " Baguio \n";
           Baguio();
           break;
           
           case 3:
           cout<< " Bicol \n";
           Bicol();
           break;
           
           case 4:
           cout<< " Cebu \n";
           Cebu();
           break;
           
           case 5:
           cout<< " Palawan \n";
           Palawan();
           break;
           
           case 6:
           cout<< " Boracay \n";
           Boracay();
           break;
           
           case 7:
           cout<< " Baler \n";
           Baler();
           break;
           
           case 8:
           cout<< " Bohol \n";
           Bohol();
           break;
           
           case 9:
           cout<< " Thank you for using the program \n";
           break;
           default:
           cout<< "Error, Pleaase Try Again \n";}
           cout << "\n\nDo you want to continue[y=yes/n=no]?\n";
           cin >> x;
           cout << "\n\n";
           system ("cls");
           }while( x == 'y');
           if ( x== 'n') { cout << " \n\n\n\nGoodbye ! \n";
           cout << firstname <<endl;
           system("COLOR f9");
           cout << "Hope that 303 Hotel Advisory have helped you!  "<< endl;
           cout << "Kindly check" <<endl;
           cout << "Thank you for using the program \n\n\n ";}
           
    system ("pause => R");
    return 0;}   
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
double a, b;
void Palawan(){
    system ("cls");
    system("COLOR f1");
    cout << "\n\n             PALAWAN\n";
    cout << "\n\nEnter The Number Of Travlers:\n";
    cin>> a;
    if ( a < 2)
    cout << "\nStandard Room \n";
    else if ( a < 3)
    cout << "\nDeluxe Twin Bedroom \n";
    else if ( a >= 3 && a <= 50 )
    cout << "\nFamily Room \n";
    cout << "\n\nHow much is your budget?:\n\n";
    cin>> b;
    if ( b < 2999)
    cout << "Sorry we do not have available hotels with that price range. Please try again. \n";    
    else if ( b >= 3000 && b <= 5000)
    cout << "We recommend Busuanga Bay Lodge,for more info you can visit their own website at: http://www.busuangabaylodge.com/ \n";   
    else if ( b >=5001 && b <= 10000)
    cout << "We recommend El Nido Beach Hotel,for more info you can visit their own website at: http://www.elnidobeachhotel.com/ \n"; 
    else
    cout << "We recommend Sheridan Beach Resort and Spa,for more info you can visit their own website at: http://www.sheridanbeachresort.com/ \n";} 

double c, d;
void Baguio(){
    system ("cls");
    system("COLOR f2");
    cout << "\n\n             BAGUIO\n";
    cout << "\n\n Enter The Number Of Travlers:\n";
    cin>> c;
    if ( c < 2)
    cout << "\nStandard Room \n";
    else if ( c < 3)
    cout << "\nDeluxe Twin Bedroom \n";
    else if ( c >= 3 && c <= 50 )
    cout << "\nFamily Room \n";
    cout << "\n\nHow much is your budget?:\n\n";
    cin>> d;
     if ( d < 2999)
    cout << "Sorry we do not have available hotels with that price range. Please try again. \n";
    else if ( d >= 3000 && d <= 5000)
    cout << "We recommend Hotel Supreme Convention Plaza,for more info you can visit their own website: http://hotelsupreme.com.ph/about-the-hotel/ \n"; 
    else if ( d >=5001 && d <= 10000)
    cout << "We recommend Casa Vallejo Hotel,for more info you can visit their own website: http://casavallejohotel.com/index.html \n";
    else
    cout << "We recommend Azalea Hotels & Residences Baguio,for more info you can visit their own website: http://www.azaleabaguio.com/ \n";}

double e, f;
void Bicol(){
    system ("cls");
    system("COLOR f3");
    cout << "\n\n             BICOL\n";
    cout << "\n\nEnter The Number Of Travlers:\n";
    cin>> e;
    if ( e < 2)
    cout << "\nStandard Room \n";
    else if ( e < 3)
    cout << "\nDeluxe Twin Bedroom \n";
    else if ( e >= 3 && e <= 50 )
    cout << "\nFamily Room \n";
    cout << "\n\nHow much is your budget?:\n\n";
    cin>> f;
     if ( f < 2999)
    cout << "Sorry we do not have available hotels with that price range. Please try again. \n";
    else if ( f >= 3000 && f <= 5000)
    cout << "We recommend Ninong's Hotel,for more info you can visit their own website: http://ninongshotel.com.ph/rooms.html \n";
    else if ( f >=5001 && f <= 10000)
    cout << "We recommend The Oriental Hotel Legazpi,for more info you can visit their own website: http://www.legazpi.theorientalhotels.com/ \n";
    else
    cout << "We recommend Casablanca Suites,for more info you can visit their own website: http://www.casablancasuites.ph/ \n";}
    
double g, h;
void Cebu(){
    system ("cls");
    system("COLOR f4");
    cout << "\n\n             CEBU\n";
    cout << "\n\nEnter The Number Of Travlers:\n";
    cin>> g;
    if ( g < 2)
    cout << "\nStandard Room \n";
    else if ( g < 3)
    cout << "\nDeluxe Twin Bedroom \n";
    else if ( g >= 3 && g <= 50 )
    cout << "           Family Room \n";
    cout << "\n\nHow much is your budget?:\n\n";
    cin>> h;
     if ( h < 2999)
    cout << "Sorry we do not have available hotels with that price range. Please try again. \n";
    else if ( h >= 3000 && h <= 5000)
    cout << "We recommend WellCome Hotel,for more info you can visit their own website: http://wellcomehotel.com/ \n";
    else if ( h >=5001 && h <= 10000)
    cout << "We recommend Castle Peak Hotel,for more info you can visit their own website: http://www.castlepeakhotel.net/ \n";
    else
    cout << "We recommend The Henry Hotel Cebu,for more info you can visit their own website: http://www.thehenryhotel.com/thehenrynew/cebu/ \n";}
    
double i, j;
void Vigan(){
    system("COLOR f5");
    system ("cls");
    cout << "\n\n             VIGAN\n";
    cout << "\n\n   Enter The Number Of Travlers:\n";
    cin>> i;
    if ( i < 2)
    cout << "\nStandard Room \n";
    else if ( i < 3)
    cout << "\nDeluxe Twin Bedroom \n";
    else if ( i >= 3 && i <= 50 )
    cout << "\nFamily Room \n";
    cout << "\n\nHow much is your budget?:\n\n";
    cin>> j;
     if ( j < 2999)
    cout << "Sorry we do not have available hotels with that price range. Please try again. \n";
    else if ( j >= 3000 && j <= 5000)
    cout << "We recommend Hotel Felicidad ,for more info you can visit their own website: https://www.hotelfelicidadvigan.com.ph/home \n";
    else if ( j >=5001 && j <= 10000)
    cout << "We recommend Hotel Veneto de Vigan ,for more info you can visit their own website: http://hotelvenetodevigan.com/ \n";
    else
    cout << "We recommend Hotel Luna,for more info you can visit their own website: http://hotelluna.ph/ \n";}

Last edited on
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
double k, l;
void Boracay(){
    system("COLOR f6");
    system ("cls");
    cout << "\n\n             BORACAY\n";
    cout << "\n\nEnter The Number Of Travlers:\n";
    cin>> k;
    if ( k < 2)
    cout << "\nStandard Room \n";
    else if ( k < 3)
    cout << "\nDeluxe Twin Bedroom \n";
    else if ( k >= 3 && k <= 50 )
    cout << "\nFamily Room \n";
    cout << "\n\nHow much is your budget?:\n\n";
    cin>> l;
     if ( l < 2999)
    cout << "Sorry we do not have available hotels with that price range. Please try again. \n";
    else if ( l >= 3000 && l <= 5000)
    cout << "We recommend Red Coconut Hotel ,for more info you can visit their own website: http://www.redcoconut.com.ph/ \n";
    else if ( l >=5001 && l <= 10000)
    cout << "We recommend Cohiba Villas Hotel ,for more info you can visit their own website: http://www.cohibavillas.com/ \n";
    else
    cout << "We recommend Boracay Regency Beach Resort & Spa ,for more info you can visit their own website: http://boracayregency.com/ \n";}

double m, n;
void Baler(){
    system("COLOR f8");
    system ("cls");
    cout << "\n\n             BALER\n";
    cout << "\n\nEnter The Number Of Travlers:\n";
    cin>> m;
    if ( m < 2)
    cout << "\nStandard Room \n";
    else if ( m < 3)
    cout << "\nDeluxe Twin Bedroom \n";
    else if ( m >= 3 && m <= 50 )
    cout << "\nFamily Room \n";
    cout << "\n\nHow much is your budget?:\n\n";
    cin>> n;
     if ( n < 2999)
    cout << "Sorry we do not have available hotels with that price range. Please try again. \n";
    else if ( n >= 3000 && n <= 5000)
    cout << "We recommend Halos Farm and Resort ,for more info you can visit their own website: http://www.agoda.com/halos-farm-and-resort/hotel/baler-ph.html \n";
    else if ( n >=5001 && n <= 10000)
    cout << "We recommend Azbahaen Leisure Farm and Resort ,for more info you can visit their own website: https://www.facebook.com/azbahaen.leisurefarm \n";
    else
    cout << "We recommend Costa Pacifica Resort ,for more info you can visit their own website: http://www.costapacificabaler.com/ \n";}

double o, p;
void Bohol(){
    system ("cls");
    system("COLOR fc");
    cout << "\n\n             BOHOL\n";
    cout << "\n\nEnter The Number Of Travlers:\n";
    cin>> o;
    if ( o < 2)
    cout << "\nStandard Room \n";
    else if ( o < 3)
    cout << "\nDeluxe Twin Bedroom \n";
    else if ( o >= 3 && o <= 50 )
    cout << "\nFamily Room \n";
    cout << "\n\nHow much is your budget?:\n\n";
    cin>> p;
     if ( p < 2999)
    cout << "Sorry we do not have available hotels with that price range. Please try again. \n";
    else if ( p >= 3000 && p <= 5000)
    cout << "We recommend Loboc River Resort ,for more info you can visit their own website: http://lobocriverresort.com/ \n";
    else if ( p >=5001 && p <= 10000)
    cout << "We recommend Ocean Suites Bohol Boutique Hotel,for more info you can visit their own website: http://www.oceansuites.ph/ \n";
    else
    cout << "We recommend The Peacock Garden ,for more info you can visit their own website: http://thepeacockgarden.com/#+ \n";}
Topic archived. No new replies allowed.