Algortima Mencari IPK #TK
- Algoritma Mencari IPK
Deklarasi
x -> integer
bernilai[100]->integer
mutu[100]->integer
Deskripsi
for(x=1;x<=jmk;x++):
read(matkul[i]);
if (matkul[i]=='A') then bnilai[i]=4;
else if (matkul[i]=='B') then bernilai[i]=3;
else if (matkul[i]=='C') then bernilai[i]=2;
else if (matkul[i]=='D') then bernilai[i]=1;
else if (matkul[i]=='E') then bernilai[i]=0;
endif
read(bsks[x]);
if(bsks[x]>=1 && bsks[x]<=4) then bsks[x]= bsks[x];
endif
mutu[x]=bernilai[x]*bsks[x];
endfor
float tmutu=0, tbobot=0;
for(y=1; y<=jmk; y++):
tmutu+=mutu[y];
tbobot+=bsks[y];
endfor
float ipk;
ipk=tmutu/tbobot;
write(ipk).
ABOUT THE AUTHOR
A web designer from India. And then you write some more information about yourself like this to fill out the space that is left.
0 komentar:
Posting Komentar