Convert exam marks to overall grade I have started working on the code below here. I want to practice my C coding skills.

It is a grading program: given a set of subject marks, calculates the sum, average and it converts the computed average to an alphabetic grade letter.

I would love to be pointed out any mistakes that I have made or any opinions to make my code more presentable.

#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;

int main()
{
    char name[100];
    int physics,chemistry,maths,biology,business,total_marks;
    // physics,chemistry,maths,biology,business are just but subjects names.
    float mean;

    printf("Please enter your name \n");
    fgets(name,100,stdin);
    {

    printf("Please enter the marks for physics \n");
    scanf("%d",&amp;physics);

    printf("Please enter the marks for chemistry \n");
    scanf("%d",&amp;chemistry);

    printf("Please enter the marks for maths \n");
    scanf("%d",&amp;maths);

    printf("Please enter the marks for biology \n");
    scanf("%d",&amp;biology);

    printf("Please enter the marks for business\n");
    scanf("%d",&amp;business);

    total_marks=physics+chemistry+maths+biology+business;
    mean= (float)total_marks/5;}

    printf("%s\t",name);
    printf(" HAS TOTAL MARKS OF : %d,\t",total_marks);
    printf(" MEAN OF :  %.2f\t",mean, round(mean) );

if (mean&gt;=70)
   printf("AND THE  GRADE IS A  \n");

if(mean&gt;=60 &amp;&amp; mean&lt;69)
   printf("AND THE  GRADE IS B  \n");

if(mean&gt;=50 &amp;&amp; mean&lt;59)
   printf("AND THE  GRADE IS C  \n");

if(mean&gt;=40 &amp;&amp; mean&lt;49)
   printf("AND THE  GRADE IS D  \n");

if (mean&lt;40)
   printf("AND THE  GRADE IS E \n");

   printf(" Thank you for your time  \n");

   return 0;
}
Formatting - if the code looks the same in your editor as it does here, you could really do with an automatic indentation tool (many editors have that built-in, or you could use GNU Indent, for instance).
I'll assume that the inconsistent indentation is due to the way you've copied your code into the site; a good way to avoid problems is to consistently use either spaces or tabs for indentation, but never to mix the two.

It's a good idea to specify that main() takes no arguments:
int main(void)


When we read input, we must check whether it was successful or not:
int physics;
if (scanf(&quot;%d&quot;, &amp;physics) == 1) {
   // physics has been set, and we can safely use it
} else {
   // physics is still uninitialised
}

If input fails, then we might want to re-ask (but be careful about doing this if we reach end of the input stream, or we'll try and try again, indefinitely).
Output can also fail, but for this application, that's less of a concern.

There's an unused argument to printf() here:

printf(&quot; MEAN OF :  %.2f\t&quot;,mean, round(mean) );


That suggests that you could enable more compiler warnings (e.g. gcc -Wall -Wextra - other compilers should have similar options).

If mean is between (say) 59.0 and 60.0, then it will fall in between the grade boundaries, and no grade will be printed.  The easy way to avoid this is to use else if:
if (mean &gt;= 70) {
    puts(&quot;AND THE  GRADE IS A&quot;);
} else if (mean &gt;= 60) {
    puts(&quot;AND THE  GRADE IS B&quot;);
} else if (mean &gt;= 50) {
    puts(&quot;AND THE  GRADE IS C&quot;);
} else if (mean &gt;= 40) {
    puts(&quot;AND THE  GRADE IS D&quot;);
} else {
    puts(&quot;AND THE  GRADE IS E&quot;);
}

Now, exactly one of those blocks will be executed.
I also changed the printf() to puts() there - prefer the simpler function when you just need to print a single string and a newline.

More advanced ideas
Should the grade thresholds be fixed in the code?  If they change, you need to re-compile the program.  Think about how you might read them from a configuration file.
Should the list of subjects be fixed?  How would you make the program more flexible for students of different courses?