Help with the out put

My program needs to be adjusted to send out the numbers as 2 decimal , but nothing work. shall I have some one to help please

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

#include <iostream>
#include <iomanip>
using namespace std;

int main()
{
int
 number_ofstyle_American,
    number_ofstyle_Modern,
    number_ofstyle_Claassical;




float    Style_American_price =85.00,
          Style_Modern_price =57.00,
           Style_Classical=127.75,

            total_sale_American,
            total_sale_Modern,
            total_sale_Classical,
            total_sale_ofAll;

total_sale_ofAll =total_sale_American +total_sale_Modern +total_sale_Classical;


total_sale_American=Style_American_price * number_ofstyle_American;


total_sale_Modern=Style_Modern_price *  number_ofstyle_Modern;


total_sale_Classical=Style_Classical * number_ofstyle_Claassical;


cout<<" Please Enter The number of chairs type American Colonial sold :"<<endl;

cout<<" Please Enter The number of chairs type Modern sold :"<<endl;

cin>>number_ofstyle_Modern;


cout<<" Please Enter The number of chairs type Classical Colonial sold :"<<endl;


cin>>number_ofstyle_Claassical;





cout << fixed << showpoint;
cout<<total_sale_Modern<<endl;
cout << setprecision (5)<<total_sale_ofAll<<endl;



return 0;
}

















If you want two decimal places, why are you calling setprecision with a value of 5?
Topic archived. No new replies allowed.