What's new

C & C++ Pa help po pls

C++:
#include <cmath>
#include <iostream>

using namespace std;

int main() {
    float a = 0;
    
    cout << "Input a number with decimal point: ";
    cin >> a;
    
    cout <<"Rounding it off to whole number: " <<round(a); 

    return 0;
}

Check mo kung tama.
 

Similar threads

Back
Top