Assigning grades using functions

This program takes the marks of three subjects from the user and assigns grade to the user based upon the overall marks obtained. The grading is in this way, Grade A if greated than 200, Grade B if greater than 100 and Grade C if less than that.

char tot(int,int,int);
void main()
int m1,m2,m3;
char g;
cout<=200 &&sum<=300) grade='A'; else if(sum>=100 && sum<=200) grade=’B’; else grade=’C’; return grade; } [/code]