WAP to round a value to nearest integer using floor function.


#include<iostream>
#include<conio.h>
#include<cmath>

using namespace std;

int main()
{
float n;
cout<<"Enter any floating point number : ";cin>>n;
cout<<"\nThe round value of "<<n<<" is "<<floor(n);
getch();
return(0);
}

No comments:

Post a Comment