// Mr. Minich // Computer Science Using C++ // Ch. 5 Demo Program #4 // January 30, 2000 // Purpose - to illustrate garbage values, typecasting, promotion, & using the int // typecast operator to round. #include<iostream.h> int main() { int myInt; cout << "This is a garbage value: " << myInt << endl << endl; double myDouble = 89.999; cout << "This is an example of typecasting: " << int (myDouble) << endl << endl; myInt = 1; cout << "This is an example of promotion: " << (int + myDouble) << endl << endl; cout << "This is an example of rounding with the int " << << "typecasting operator: " << int (0.5 + myDouble) << endl << endl; return 0; }// end of main