Gabung Ke Forum Saya Di 4KA01

Program Sederhana menghitung IPK

Program Penghitung IPK
/*copyright UchihaKurtz I'll amaterasu you if you copy this */
#include"iostream.h" 

#include"stdlib.h" 




using namespace std;
using std::string;


unsigned int iJMK, i, iSKS[30], iMutu[30];
float fJM, fJSKS, fIPK;
string sIndex[10], sTanya;
void disHeader();
void disInput();
void disOutput();
int main()
{
iJMK = 0;
fJSKS = 0;
fJM = 0;
i = 1;
system("cls");
disHeader();
cout<<"Jumlah Mata Kuliah Anda semester Ini [1-30]: ";
cin>>iJMK;
while (i <= iJMK)
{

disInput();
i++;
}
for (i = 1; i <= iJMK; i++)
{
disOutput();
}
for (i = 1; i <= iJMK; i++)
{
fJSKS = fJSKS + iSKS[i];
fJM = fJM + iMutu[i];
}
fIPK = fJM/fJSKS;
cout<<"\n\nJumlah MK : "<<<"\n";

cout<<"Jumlah SKS : "<<<"\n";

cout<<"Jumlah Mutu : "<<<"\n";

cout<<"IP Kumulatif: "<<<"\n";




Tanya:




cout<<"\nUlang Lagi? [Y/T] ";


cin>>sTanya;
if (sTanya == "Y" || sTanya == "y")
main();
else if (sTanya == "T" || sTanya == "t")
return(0);
else goto Tanya;
}
void disHeader()
{
cout<<"\t\tProgram Penghitung IPK\n\n";
}
void disInput()
{
i = 1;
while (i <= iJMK)
{
TryAgain:
system("cls");
disHeader();
cout<<"Mata Kuliah "<

cout<<"\n\nJumlah SKS: ";




cin>>iSKS[i];



cout<<"Masukkan Index/Code Nilai: ";


cin>>sIndex[i];
if (sIndex[i] == "A" || sIndex[i] == "a")
{
iMutu[i] = 4 * iSKS[i];
sIndex[i].assign("A");
}
else if (sIndex[i] == "B" || sIndex[i] == "b")
{
iMutu[i] = 3 * iSKS[i];
sIndex[i].assign("B");
}
else if (sIndex[i] == "C" || sIndex[i] == "c")
{
iMutu[i] = 2 * iSKS[i];
sIndex[i].assign("C");
}
else if (sIndex[i] == "D" || sIndex[i] == "d")
{
iMutu[i] = 1 * iSKS[i];
sIndex[i].assign("D");
}
else if (sIndex[i] == "E" || sIndex[i] == "e")
{
iMutu[i] = 0;
sIndex[i].assign("E");
}
else goto TryAgain;
i+=1;
}
}
void disOutput()
{
system("cls");
disHeader();
cout<<"--------------------------------------------------------------------\n";
cout<<"Mata Kuliah\t\tSKS\tIndex\t";
cout<<"\n--------------------------------------------------------------------\n";
for (i = 1; i <= iJMK; i++)
{
cout<<"MatKul "<<<"\t"<<"\t"<<<"\t"<<<"\n";




}
}


6 Komentar:

Anonymous said...

ijin kopas aplikasi programnya bro...

mayasri said...

wahh thx bgtt yahh infoo nyaa

Anonymous said...

it works, bro.. makasi ya

Anonymous said...

hmm.. thx

Anonymous said...

Bro,ijin kopas aplikasi programnya bro...

Fendy's Web said...

Trima kasih buat komment nya..
Karena banyak yang pesan source codenya temen-temen dapat download link nya dibawah ini :

http://www.4shared.com/document/0en_WtK3/Aplikasi_Perhitungan_IPK_With_.html