8/11/2019 Program Menghitung Ipk C
Amazy merupakan peusahaan yang bergerak dibidang kuliner, disini saya melakukan penelitian terhadap perusahaan tersebut menggunakan metode S.
#include <iostream>
#include <conio> #include <stdio> float sxi (float aa, float bb); float ipk (float aa, float bb) ; void main() { float tm,ts,b,sks[24],ip[24]; int a; char matkul[20][50]; cout<<'Masukkan Banyak Mata Kuliah : '; cin>>tm; cout<<'Total SKS : '; cin>>ts; clrscr(); cout<<'|---------------------------------------------------------|'<<endl; gotoxy (1,2); cout<<'| No |'; gotoxy (7,2); cout<<'| Nama Mata Kuliah |'; gotoxy (29,2); cout<<'| SKS/Matkul |'; gotoxy (43,2); cout<<'| IP '<<endl; cout<<'|----||--------------------||------------||---------------|'<<endl; gotoxy (59,2); cout<<'|'; b=0; for (a=1;a<=tm;a++){ gotoxy (1,a+3); cout<<'|'; gotoxy (2,a+3); cout<<' '<<a<<'.'; gotoxy (6,a+3); cout<<'||'; gotoxy (9,a+3); gets (matkul[a]); gotoxy (28,a+3); cout<<'||'; gotoxy (31,a+3); cin>>sks[a]; gotoxy (42,a+3); cout<<'||'; gotoxy (45,a+3); cin>>ip[a]; gotoxy (59,a+3); cout<<'|'; b=b+sks[a];} gotoxy (1,tm+4); cout<<'|---------------------------------------------------------|'<<endl; /* if (b<=ts||b>=ts){ gotoxy (1,20); cout<<'Total SKS Per Matkul Tidak Sama Dengan Jumlah SKS'<<endl; cout<<'Anda Memasukkan Jumlah SKS '<<ts<<' Sedangkan Total SKS/Matkul '<<b; } else {cout<<'Total SKS '<<b<<' Jumlah SKS '<<ts;} */ float d; float c[10]; for (a=1;a<=tm;a++){ c[a] = sxi (sks[a], ip[a]); d=d+c[a];} float t = ipk (d,ts); gotoxy (1,19); cout<<'IPK Anda '<<t; getch(); } float sxi (float aa, float bb){ return aa*bb;} float ipk (float aa, float bb){ ![]() return aa/bb;} /* cout<<'|---------------------------------------------------------|'<<endl; gotoxy (1,2); cout<<'| No |'; gotoxy (7,2); cout<<'| Nama Mata Kuliah |'; gotoxy (29,2); cout<<'| SKS/Matkul |'; gotoxy (43,2); cout<<'| IP |'<<endl; gotoxy (51,2); cout<<'| Grade |'; cout<<'|----||--------------------||------------||----||---------|'<<endl; gotoxy (59,2); cout<<'|'; b=0; for (a=1;a<=tm;a++){ gotoxy (1,a+3); cout<<'|'; gotoxy (2,a+3); cout<<' '<<a<<'.'; gotoxy (6,a+3); cout<<'||'; gotoxy (9,a+3); cout<<matkul[a]; gotoxy (28,a+3); cout<<'||'; gotoxy (31,a+3); cout<<sks[a]; gotoxy (42,a+3); cout<<'||'; gotoxy (45,a+3); cout<<ip[a]; gotoxy (59,a+3); cout<<'|'; b=b+sks[a];} */ Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |