Color the text

I want to color some of the outputs on the code below
can anyone teach me an easy way to do that?
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
 #include <iostream>
#include <cstdlib>

using namespace std;

double nos,mv;
void sale()
{
    cout<<"\n\t\t\t\t>----SALE----<"<<endl;

    cout<<"Enter the Net of Sale: ";
    cin>>nos;
    cout<<endl<<"Enter the Market Value: ";
    cin>>mv;

    if(mv>=nos)
    {
        cout<<endl<<"\t\t\t  CGT...............PHP "<<mv*.06<<endl;
        cout<<"\t\t\t  Doc Stamp.........PHP "<<(mv/1000)*15<<endl;
        cout<<"\t\t\t  Transfer Tax......PHP "<<nos*.02<<endl;
        cout<<"\t\t\t  Gross Tax.........PHP "<<(mv*.06)+((mv/1000)*15)+(nos*.02);
    }

    if(nos>mv)
    {
        cout<<endl<<"\t\t\t  CGT...............PHP "<<nos*.06<<endl;
        cout<<"\t\t\t  Doc Stamp.........PHP "<<(nos/1000)*15<<endl;
        cout<<"\t\t\t  Transfer Tax......PHP "<<nos*.02<<endl;
        cout<<"\t\t\t  Gross Tax.........PHP "<<(nos*.06)+((nos/1000)*15)+(nos*.02);

    }

}

void donation()
{
    cout<<"\n\t\t\t\t>----DONATION----<"<<endl;

    cout<<endl<<"Enter the Market Value: ";
    cin>>mv;



        cout<<endl<<"\t\t\t    CGT...............PHP "<<mv*.06<<endl;
        cout<<"\t\t\t    Doc Stamp.........PHP "<<(mv/1000)*15<<endl;
        cout<<"\t\t\t    DNT...............PHP "<<(mv*.12)<<endl;
        cout<<"\t\t\t    Transfer Tax......PHP "<<mv*.07<<endl;
        cout<<"\t\t\t    Gross Tax.........PHP "<<(mv*.06)+((mv/1000)*15)+(mv*.12)+(mv*.07);



}

double mv1=0,mv2=0,mv3=0,tmv;


void inheritance()
{
    cout<<"\n\t\t\t\t>----INHERITANCE----<"<<endl;

    cout<<endl<<"Enter the Market Value (PROPERTY 1): ";
    cin>>mv1;
    cout<<"Enter the Market Value (PROPERTY 2): ";
    cin>>mv2;
    cout<<"Enter the Market Value (PROPERTY 2): ";
    cin>>mv3;




        tmv=mv1+mv2+mv3;

        cout<<endl<<"\t\t\t      Total Market Value = PHP "<<tmv<<endl;
        cout<<endl<<"\t\t\t      CGT...............PHP "<<tmv*.06<<endl;
        cout<<"\t\t\t      Doc Stamp.........PHP "<<(tmv/1000)*15<<endl;
        cout<<"\t\t\t      Estate Tax........PHP "<<tmv*.20<<endl;
        cout<<"\t\t\t      Transfer Tax......PHP "<<tmv*.07<<endl;
        cout<<"\t\t\t      Gross Tax.........PHP "<<(tmv*.06)+((tmv/1000)*15)+(tmv*.20)+(tmv*.07);





}


int main()
{
    int month,day,year;
    cout<<endl<<"\tSelect Date (00/00/0000)"<<endl;
    cout<<endl<<"Enter Month: ";
    cin>>month;
    cout<<"Enter Day: ";
    cin>>day;
    cout<<"Enter Year: ";
    cin>>year;

    char choice,choicea,choiceb,choicec;
    menu:
        system("cls");
     cout<<endl<<"\t      >-----------------------<";
    cout <<"\n\t\tComputerized Taxation \n\t\t\tFor \n\t\t Land Title Transfer"<<endl;
    cout<<"\t      >-----------------------<"<<endl;
    cout<<"\t\t     "<<month<<"/"<<day<<"/"<<year<<endl;
    cout<<endl<<"\t\t     Main Menu:"<<endl;
    cout<<endl<<"\t\t   [A]. Sale\n\t\t   [B]. Donation\n\t\t   [C]. Inheritance"<<endl;

    cout<<"\n\tChoose a Letter:";
    cin>>choice;

    if(choice=='A'||choice=='a')
    {
        amenu:
        system("cls");
        sale();


        cout<<endl<<endl<<"Would you like to?"<<endl;
        cout<<"[A].Exit Program"<<endl;
        cout<<"[B].Back To Main Menu"<<endl;
        cin>>choicea;

        if(choicea=='A'||choicea=='a')
        {

            system("cls");
            cout<<"\n\n\t\tThank You!"<<endl<<endl;
            system("pause");
            return 0;
        }else
        if(choicea=='B'||choicea=='b')
        {
            system("cls");
            cout<<endl<<endl<<"\t\t Back to Menu . . ."<<endl<<endl;
            system("pause");
            goto menu;
        }
        else
        {

           system("cls");
           cout<<"\n\n\t\t\t\t\tInvalid Input!"<<endl<<endl;
           system("pause");
            goto amenu;
        }

    }


    else if(choice=='B'||choice=='b')
    {
        bmenu:
        system("cls");
        donation();


        cout<<endl<<endl<<"Would you like to?"<<endl;
        cout<<"[A].Exit Program"<<endl;
        cout<<"[B].Back To Main Menu"<<endl;
        cin>>choiceb;

        if(choiceb=='A'||choiceb=='a')
        {

            system("cls");
            cout<<"\n\n\t\tThank You!"<<endl<<endl;
            system("pause");
            return 0;
        }else
        if(choiceb=='B'||choiceb=='b')
        {
            system("cls");
            cout<<endl<<endl<<"\t\t Back to Menu . . ."<<endl<<endl;
            system("pause");
            goto menu;
        }
        else
        {
           system("cls");
           cout<<"\n\n\t\t\t\t\tInvalid Input!"<<endl<<endl;
           system("pause");
            goto bmenu;
        }
    }

        else if(choice=='C'||choice=='c')
    {
        cmenu:
        system("cls");
        inheritance();


        cout<<endl<<endl<<"Would you like to?"<<endl;
        cout<<"[A].Exit Program"<<endl;
        cout<<"[B].Back To Main Menu"<<endl;
        cin>>choicec;

        if(choicec=='A'||choicec=='a')
        {

            system("cls");
            cout<<"\n\n\t\tThank You!"<<endl<<endl;
            system("pause");
            return 0;
        }else
        if(choicec=='B'||choicec=='b')
        {
            system("cls");
            cout<<endl<<endl<<"\t\t Back to Menu . . ."<<endl<<endl;
            system("pause");
            goto menu;
        }
        else
        {
           system("cls");
           cout<<"\n\n\t\t\t\t\tInvalid Input!"<<endl<<endl;
           system("pause");
            goto cmenu;
        }

    }
    else
    {
        system("cls");
        cout<<"\n\n\t\t\t\t\tInvalid Input!"<<endl<<endl;
        system("pause");
        goto menu;
    }
    return 0;
}
There is no easy way, it is dependent on the OS.

For Windows here is one possible way:

http://www.cplusplus.com/articles/Eyhv0pDG/
Topic archived. No new replies allowed.