GPA

Description:

C++ Program to store GPA of n number of students and display it where n is the number of students entered by user. Test Case 1 Input (stdin) 4 2.3 4.2 3.1 2.2 Expected Output Displaying GPA of students Student1=2.3 Student2=4.2 Student3=3.1 Student4=2.2 Test Case 2 Input (stdin) 3 7.6 4.3 6.4 Expected Output Displaying GPA of students Student1=7.6 Student2=4.3 Student3=6.4

Program :

#include <iostream>

using namespace std;

int main()

{

int i,n,s=0;

  float a;

  cin>>n;

  cout<<"Displaying GPA of students";

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

  {

    cin>>a;

    s=s+1;

    cout<<endl<<"Student"<<s<<"="<<a;

}

}