#include <iostream>
using namespace std;
void round();
int main()
{
void round();
{
double input;
double output;
double first;
double second;
double third;
double decimal_fix;
cout << "Please enter the Number and the Places to round off" << endl;
cin >> input;
cout << "DEcimal places to fix" <<endl;
cin >> decimal_fix;
output = input * 1000;
first = output + .5;
second = (float)first / 100;
third = second / 10;
cout << third << endl;
}
return 0;
}
right so i tired to run it and it would not round off to 2 decimal places as i want it to and also i wanted to put 10^n so that n would be the number of places to round off to but i am completely lost :S help please