Take a look at the following code:
float MyVariable, YourVariable, OurVariable;
MyVariable = 3.456;
YourVariable = 3.75;
OurVariable = MyVariable + YourVariable;
cout << "Here is the value of OurVariable :" << OurVariable << endl;
I was wondering how I can round numbers in two ways:
1) How can I round both values before I total them?
2) How can I round the value of there sum to a certain number of decimal places?