Computer Science, asked by tanishthakur7865, 9 months ago

Hermoine is a very brilliant girl. She has completed her Semester exam. She is eagerly waiting for her CGPA. Her class adviser, Mr.Tom need to upload the CGPA of the student. Can you help him out for the same. He needs to display the CGPA of a student. c++ program

Answers

Answered by pavithranatarajan855
2

Answer:

#include<iostream>

int main(){

 float CGPA;

 std::cin>>CGPA;

 std::cout<<CGPA;

}

Explanation:

Answered by Sahil3459
0

Answer:

The cumulative grade point average (CGPA) is a methodical arrangement used in the educational system to calculate a grade point average.

Explanation:

The aim is to determine the CGPA and the percentage of the student's CGPA given an array arr[] of size N that contains the marks of the student in N subjects.

Lets consider all marks to be out of 100, for each subject.

#include<bits/stdc++.h>

using namespace std;

double CgpaCalc(double marks[], int n)

{

   // Variable to store the grades in

   // every subject

   double grade[n];

   // Variables to store CGPA and the

   // sum of all the grades

   double cgpa, sum = 0;

   // Computing the grades

   for(int i = 0; i < n; i++)

   {

      grade[i] = (marks[i] / 10);

   }

   // Computing the sum of grades

   for(int i = 0; i < n; i++)

   {

      sum += grade[i];

   }

   // Computing the CGPA

   cgpa = sum / n;

   return cgpa;

}

// Driver code

int main()

{

   int n = 5;

   double marks[] = { 90, 80, 70, 80, 90 };

   double cgpa = CgpaCalc(marks, n);        

   cout << "CGPA = ";

   printf("%.1f\n", cgpa);

   cout << "CGPA Percentage = ";

   printf("%.2f", cgpa * 9.5);

}

Similar questions