floor function

please give me feedback on :)
https://www.facebook.com/invigorating.arslaan

#include<iostream>
using namespace std;
void main()
{
float n,m;
cout<<"enter any float number   ";
cin>>n;
int a;
a=n;
m=n;
if(a!=n)
{
if(n>0)
{
while(m>1)
{
m=m-1;
}
n=n-m;
}
if(n<0)
{
while(m<0)
{
m=m+1;
}
n=n-m;
}
}
cout<<"the floor number is "<<n<<endl;
}

Comments

Popular Posts