+ 1
Write a c++ program ,calculate the CGPA of 5
3 ответов
+ 3
u can't assign cgpa of all 5 person's using single variable"cgpa"
- 1
cgpa=a/9.5=b/9.5... here's an error
- 1
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
float a[5];
for( int i=0; i<5; i++)
{
cout<<"Enter % marks obtained by "<<i+1<<" student\n";
cin>>a[i];
a[i]=a[i]/9.5;
cout<<"CGPA of "<<i+1<<" student is "<<a[i]<<"\n";
}
getch();
}