ARRAY
#include
using namespace std;
int main()
{
int nilai[100],i,A,B,C,D,E;
E=0;
D=0;
C=0;
B=0;
A=0;
for (i=0;i<100;i++)
{
cout<<"Nilai Mahasiswa ke "<<<" = ";
cin>>nilai[i];
cout<
if(nilai[i]==00)
{break;}
if (nilai[i]<50&&nilai[i]>0)
{
E=E+1;
}
if (nilai[i]<58&&nilai[i]>=50)
{
D=D+1;
}
if (nilai[i]<68&&nilai[i]>=58)
{
C=C+1;
}
if (nilai[i]<80&&nilai[i]>=68)
{
B=B+1;
}
if (nilai[i]>=80)
{
A=A+1;
}
}
cout<<"Jumlah Mahasiswa Grade A = "<< cout<<"Jumlah Mahasiswa Grade B = "<<
cout<<"Jumlah Mahasiswa Grade C = "<<
cout<<"Jumlah Mahasiswa Grade D = "<<
cout<<"Jumlah Mahasiswa Grade E = "<<<
system("PAUSE");
}
using namespace std;
int main()
{
int nilai[100],i,A,B,C,D,E;
E=0;
D=0;
C=0;
B=0;
A=0;
for (i=0;i<100;i++)
{
cout<<"Nilai Mahasiswa ke "<<<" = ";
cin>>nilai[i];
cout<
if(nilai[i]==00)
{break;}
if (nilai[i]<50&&nilai[i]>0)
{
E=E+1;
}
if (nilai[i]<58&&nilai[i]>=50)
{
D=D+1;
}
if (nilai[i]<68&&nilai[i]>=58)
{
C=C+1;
}
if (nilai[i]<80&&nilai[i]>=68)
{
B=B+1;
}
if (nilai[i]>=80)
{
A=A+1;
}
}
cout<<"Jumlah Mahasiswa Grade A = "<<
cout<<"Jumlah Mahasiswa Grade C = "<
cout<<"Jumlah Mahasiswa Grade D = "<
cout<<"Jumlah Mahasiswa Grade E = "<
system("PAUSE");
}
No comments:
Post a Comment