Skip to content

Instantly share code, notes, and snippets.

@nalin-adh
Created November 10, 2015 17:00
Show Gist options
  • Save nalin-adh/03218cf3ea35331a4cab to your computer and use it in GitHub Desktop.
Save nalin-adh/03218cf3ea35331a4cab to your computer and use it in GitHub Desktop.
A C++ program 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);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment