// macho rounding #include #include using namespace std; int main() { double num = 0.0; double roundedNum = 0.0; cout << "Enter a number with decimal places: "; cin >> num; roundedNum = int (num + 0.5); cout << "Rounded to the nearest whole number: " << roundedNum << endl; cout << "Enter a number with more than 2 decimal places: "; cin >> num; roundedNum = (int ((num * 100) + 0.5))/ 100.0; cout << num << "Rounded to the nearest hundredth's place: " << roundedNum << endl; system("pause"); return 0; } //end of main