# Program to calculate the CGPA percentage

Program to calculate the CGPA percentage on fibonacci, factorial, prime, armstrong, swap, reverse, search, sort, stack, queue, array, linkedlist, tree, graph etc.

# Program to calculate the CGPA percentage

### Explanation

In this program, we have to calculate the CGPA percentage of five subjects( English, Hindi, Maths, Science and Social Study).

CGPA ( Cumulative Grade Point Average ) is the systematic arrangement in the educational stream to get average of grade points. And the CGPA percentage is 9.5 times the CGPA.

CGPA = (Grades in all Subjects) / (Total Number of Subjects).

So, CGPA= 9.5 × CGPA

### Formula

```CGPA =  9.5 × CGPA
```

### Algorithm

1. Enter grades in every subject.
2. Apply in formula CGPA.
3. Calculate CGPA percentage.
4. Print the CGPA percentage.

O(1)

### Python

```English = 9.1
Hindi = 8.5
Maths = 9.5
Science =9.6;
SocialStudy = 8.6
CGPA = (9.1+8.5+9.5+9.6+8.6)/(5.0)
CGPAper = 9.5 * (CGPA)
print(" CGPA percentage is:");
print(CGPAper);
```

Output:

```CGPA percentage is:
86.07000000001
```

### C

```#include<stdio.h>
int main()
{
double English , Hindi ,Maths, Science, SocialStudy, CGPA , CGPAper ;
English = 9.1;
Hindi = 8.5;
Maths = 9.5;
Science =9.6;
SocialStudy = 8.6;
CGPA = (9.1+8.5+9.5+9.6+8.6)/(5.0);
CGPAper = (float)(9.5 * (CGPA));
printf("\n\n CGPA percentage is: %f",CGPAper);
return (0);
}
```

Output:

```CGPA percentage is:  86.070000
```

### Java

```public class CGPAProgram
{
public static void main (String args[])
{
double English, Hindi, Maths, Science, SocialStudy, CGPA, CGPAper ;
English = 9.1;
Hindi = 8.5;
Maths = 9.5;
Science =9.6;
SocialStudy = 8.6;
CGPA = (9.1+8.5+9.5+9.6+8.6)/(5.0);
CGPAper = (float)(9.5 * (CGPA));
System.out.println(" CGPA Percentage is:  "+CGPAper);
}
}
```

Output:

```CGPA Percentage is:  86.06
```

### C#

```using System;
class Program
{   static void Main()
{
double English, Hindi, Maths, Science, SocialStudy, CGPA, CGPAper ;

English = 9.1;
Hindi = 8.5;
Maths = 9.5;
Science =9.6;
SocialStudy = 8.6;
CGPA = (9.1+8.5+9.5+9.6+8.6)/(5.0);
CGPAper = (float)(9.5 * (CGPA));

Console.WriteLine("CGPA percentage is:"+CGPAper);
}
}
```

Output:

```CGPA percentage is:  86.06
```

### PHP

```<?php
\$English = 9.1;
\$Hindi = 8.5;
\$Maths = 9.5;
\$Science =9.6;
\$SocialStudy = 8.6;
\$CGPA = (9.1+8.5+9.5+9.6+8.6)/(5.0);
\$CGPAper = 9.5 * \$CGPA;
echo("CGPA percentage is= ");
echo(\$CGPAper);
?>
```

Output:

```CGPA percentage is =  86.07
```

Next Topic#