# How To Calculate GPA For SSC and HSC

Nowadays all Educational board all over the world has been changed their result publishing system.

Before most of the Educational board would publish their result in division system.Because of  some problem or to get better Performance  a new system is developed which is known as a grading system for O level and A level.

As it is a New system that’s why most of us don’t know how to calculate GPA(grade  point Average) for

PSC (primary school certificate),

JSC/JDC(Junior school certificate/Junior dakhil certificate),

SSC(secondary school certificate) & for HSC(Higher secondary certificate).

From this idea, I write  this tutorial on how do you calculate GPA  or how do you calculate a grade point averageFor this, i have written a program in c that will  help you  to find your correct GPA(grade point average).

## To Calculate your GPA(grade point average) you have followed following Step:

1.copy and past of the following program code on Code Blocks or other Compiler that can run C program.

2.Then save as GPA.cpp

3.Then Compile it.

4.Finally run it & follow it’s command.

## Here is program code:

```#include <stdio.h>

int main()
{
int i,sub,marks,op,osub;
float gp =0.0;

printf("\n ---GPA CALCULATION FOR SSC & HSC:---\n\n");
printf("\nEnter the number of main subjects: ");
scanf("%d",&sub);

for(i=1; i<=sub; i++)
{
printf("Enter %d No Subject marks: \n",i);
scanf("%d",&marks);
switch(marks/10)
{
case 10:
case 9:
case 8:printf("A+\n");gp=gp+5.0;break;
case 7:printf("A\n");gp=gp+4.0;break;
case 6: printf("A-\n");gp=gp+3.5; break;
case 5: printf("B\n"); gp=gp+3.0; break;
case 4: printf("C\n"); gp=gp+2.5; break;
case 3: printf("D\n"); gp=gp+2.0; break;
default: printf("F\n");
}
}
printf("\nIf you have any optional Subject then Press :1 \nIf you have No optional Subject then Press :0\n\n");
scanf("%d",&op);
if(op==1)
{
printf("Enter the marks of Optional subjects: ");
scanf("%d",&osub);
switch(osub/10)
{
case 10:
case 9:
case 8:printf("A+\n");gp=gp+3.0;break;
case 7:printf("A\n");gp=gp+2.0;break;
case 6: printf("A-\n");gp=gp+1.5; break;
case 5: printf("B\n"); gp=gp+1; break;
case 4: printf("C\n"); gp=gp+.50; break;
case 3: printf("D\n"); gp=gp+0.0; break;
default: printf("F\n");
}
if(sub==5)
{
if(gp>25.0)
{gp=25.0;
}
else
}
if(sub==8)
{
if(gp>40.0)
{
gp=40.0;