round up 2 digits float c++
#include <iostream>
#include <cmath>
int main() {
float originalNumber, roundedNumber;
// Step 1: Input the original floating-point number
std::cout << "Enter a floating-point number: ";
std::cin >> originalNumber;
// Step 2: Round up the floating-point number to two decimal places
roundedNumber = std::ceil(originalNumber * 100.0) / 100.0;
// Step 3: Display the rounded-up number
std::cout << "Rounded-up number to two decimal places: " << roundedNumber << std::endl;
return 0;
}