remove decimal c++
#include <iostream>
#include <cmath>
int main() {
double number;
// Input
std::cout << "Enter a decimal number: ";
std::cin >> number;
// Remove decimal part
int integerPart = static_cast<int>(number);
// Output
std::cout << "Number without decimal part: " << integerPart << std::endl;
return 0;
}