I have created a program that should roundup a number:
Code:
#include <iostream>
using namespace std;
int main()
{
double numr;
int numroundup = numr;
int numroundup1= numr + 1;
cout<<"Input a number \n";
cin>>numr;
if(numr >= .5){
cout<<"\nThe number is: \n";
cout<<numroundup1;
cin.get();
}
else if(numr < .5){
cout<<"The number is: ";
cout<<numroundup;
cin.get();
}
return 0;
}
When I put the number it always says that the number is 1