Rounding Numbers Up or Down

I'm having trouble with this program that I need to round these values either to zero or 2.375 depending on there out put. The program is supposed to take in values ofr Completed Passes, pass attempts, passing yards, touchdown passes and interceptions. I would like my answers to round up or down.
Here is my code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*----------------------------------------------------*/
/*                                                    */
/*                                                    */
/*  This program computes the Quaterback Rating       */
/*                                                    */

#include <iostream>
#include <cmath> 
#include<iomanip>

using namespace std;


int main()
{

int       A,         // A  Completed Passes
          B,         // B  Pass Attempts
          C,        //  C  Passing Yards
          D,        //  D  Touchdown Passes
          E;        //  E  Interceptions
          
double round    W,       //   W Completion Ratio
          X,             //   X Yards per pass
          Y,             //   Y Touchdown Ratio
          Z,             //   Z Interception Ratio
   qbRATING,
   num=0.06;       


cout<<"Please input the following data seperated by a space in the following\n"
"order (Completed Passes, Pass Attempts, Passing Yards, Touchdown Passes and\n"
"Interceptions):\n";

cin>>A>>B>>C>>D>>E;



//Calculate out the completion ratio, yards per pass, touchdown ation and the
//interception ratio
 W = ((A/B)*100 - 30)/20;
 X = ((C/B)-3.00)/4.00;
 Y = ((D/B)*100)/5.00;
 Z = (9.50 - (E/B) * 100)/4.00;
qbRATING = (W + X + Y + Z) / 0.06;

 
cout<<" The players stats as follows:\n";
cout<<"   Completion Ratio:"<< W <<endl;
cout<<"   Yards Per Pass:"<< X <<endl;
cout<<"   Touchdown Ratio:"<< Y <<endl;
cout<<"   Interception Ratio:"<< Z <<endl;

cout<<"\n\nThe quaterback rating is:"<<qbRATING<<endl;


       
   

system("PAUSE");
   //  Exit program.
   return 0;
}
/*----------------------------------------------------*/
Rounding Algorithms
http://www.cplusplus.com/forum/articles/3638/

And while I'm at it...
Keep the console open long enough to see your program's output
http://www.cplusplus.com/forum/articles/7312/

Hope this helps.
Topic archived. No new replies allowed.