01: /****************************************************************************
02: ** COPYRIGHT (C):    1996 Cay S. Horstmann. All Rights Reserved.
03: ** PROJECT:          Computing Concepts with C++ 2E
04: ** FILE:             coins1.cpp
05: ** NOTE TO STUDENTS: This file has been edited to be compatible with older
06: ** compilers. If your compiler fully supports the ANSI/ISO C++
07: ** standard, remove the line #include "ccc_ansi.cpp". You can also remove
08: ** the lines #ifndef CCC_ANSI_H and #endif
09: ****************************************************************************/
10: 
11:    #include "ccc_ansi.cpp" // We don't need this
12:    #ifndef CCC_ANSI_H // We don't need this
13: 
14: #include <iostream>
15: 
16: using namespace std;
17: 
18:    #endif // We don't need this
19: 
20: int main()
21: {  
22:    int pennies = 8;
23:    int dimes = 4;
24:    int quarters = 3;
25: 
26:    double total = pennies * 0.01 + dimes * 0.10 + quarters * 0.25;
27:                 /* total value of the coins */
28: 
29:    cout << "Total value = " << total << "\n";
30: 
31:    return 0;
32: }