ceil() function

The ceil() function returns the smallest possible integer value which is greater than or equal to the given argument.

Example:

Input:  value=24.6
Output: 25

Approach

C++

#include <bits/stdc++.h>
using namespace std;

int main()
{
    double value = 24.6;

    cout << ceil(value);

    return 0;
}


No comments:

Post a Comment