Program C++ KRS DAN KHS

 Program C++ KRS DAN KHS

Code :

                                    

//judul : Tugas KHS & KRS //programmer : Dwi Ramdhona //13 Okt 2022 #include <iostream> #include <iomanip> using namespace std ; //kamus char an,t,yt; int prodi,tahun,nim,kel,sks1,sks2,sks3,sks4,sks5,sks6,nilai1,nilai2,nilai3,nilai4,nilai5,nilai6; string nama ,matkul1,matkul2,matkul3,matkul4,matkul5,matkul6; //deskripsi int main() { cout << "PROGRAM INPUT KHS Mahasiswa" <<endl; cout << "Silahkan masukan data data yang diperlukan"<<endl; cout << "SIlahkan masukan nama anda : "; getline(cin,nama); cout << "Masukan 3 Digit NIM Awal : "; cin >> an>>prodi; cout <<"tahun Masuk: "; cin >> tahun; cout <<"5 Digit Terakhir NIM:"; cin >>nim; awal: cout<<endl; cout << "KRS Mahasiswa "<< nama <<endl; cout <<"Kelompok :"; cin >>kel ; if ( kel == 4102 ) { cout << " KRS Mahasiswa" <<endl; cout <<"A11.54105 == KALKULUS 1 == A11.4102 == SELASA, 07.00-08.40 == H.3.9 == JUMAT, 07.00-08.40 == KULINO" <<endl; cout <<"A11.54105 == DASPRO == A11.4102 == KAMIS, 12.30-14.10 == H.4.9 == SENIN, 08.40-10.20 == D.2.G" <<endl; cout <<"A11.54105 == MATEMATIKA DISKRIT == A11.4102 == KAMIS, 09,30-12.00 == H.4.4" <<endl; cout <<"A11.54105 == PEMROGRAMAN BERBASIS WEB == A11.4102 == SENIN, 07.00-08.40 == D.3.M" <<endl; cout <<"A11.54105 == ORGANISASI DAN ARSITEKTUR KOMPUTER == A11.4102 == RABU, 09.30-12.00 == H.4.6" <<endl; cout <<"A11.54105 == DASAR-DASAR KOMPUTASI == A11.4102 == SELASA, 10.20-12.00 == D.2.J" <<endl; } else { cout<<"Input yang Anda masukkan salah, Silahkan Ulangi Input!"<<endl; goto awal; } cout <<endl; cout <<endl; cout<<"NAMA: "; cout << nama<< endl; cout <<"NIM : "; cout << an << prodi <<"."<<tahun<<"."<<nim<<endl; cout << "masukan Nama Matkul pertama : "; cin >> matkul1; cout << "Masukan jumlah sks matkul pertama : "; cin >> sks1; cout << "Masukan Nilai dari matkul pertama : "; cin >> nilai1; cout << "masukan Nama Matkul kedua : "; cin >> matkul2; cout << "Masukan jumlah sks matkul kedua : "; cin >> sks2; cout << "Masukan Nilai dari matkul kedua : "; cin >> nilai2; cout << "masukan Nama Matkul ketiga : "; cin >> matkul3; cout << "Masukan jumlah sks matkul ketiga : "; cin >> sks3; cout << "Masukan Nilai dari matkul ketiga : "; cin >> nilai3; cout << "masukan Nama Matkul keempat : "; cin >> matkul4; cout << "Masukan jumlah sks matkul keempat : "; cin >> sks4; cout << "Masukan Nilai dari matkul keempat : "; cin >> nilai4; cout << "masukan Nama Matkul kelima : "; cin >> matkul5; cout << "Masukan jumlah sks matkul kelima : "; cin >> sks5; cout << "Masukan Nilai dari matkul kelima : "; cin >> nilai5; cout << "masukan Nama Matkul keenam : "; cin >> matkul6; cout << "Masukan jumlah sks matkul keenam : "; cin >> sks6; cout << "Masukan Nilai dari matkul keenam : "; cin >> nilai6; cout <<endl; cout <<endl; cout <<"_____________________________________________________________"<<endl; cout<< "------------------KARTU HASIL STUDI MAHASISWA-----------------"<<endl; cout<< "-----------------PROGRAM STUDI TEKNIK INFORMATIKA-------------"<<endl; cout<< "-------------------UNIVERSITAS DIAN NUSWANTORO----------------"<<endl; cout<<"NAMA: "; cout << nama<< endl; cout <<"NIM : "; cout << an << prodi <<"."<<tahun<<"."<<nim<<endl; cout << "+-----------------+--------+-------+"<<endl; cout << "| Nama Mata Kuliah| sks |Nilai |"<<endl; cout << "+-----------------+--------+-------+"<<endl; cout << "| " << setiosflags(ios::left) << setw(15) <<matkul1<< " | "; cout << setiosflags(ios::left) << setw(6) <<sks1 << " | "; cout << setiosflags(ios::left) << setw(5) << nilai1 << " | "<<endl; cout << "+-----------------+--------+-------+"<<endl; cout << "| " << setiosflags(ios::left) << setw(15) <<matkul2<< " | "; cout << setiosflags(ios::left) << setw(6) <<sks2 << " | "; cout << setiosflags(ios::left) << setw(5) << nilai2 << " | "<<endl; cout << "+-----------------+--------+-------+"<<endl; cout << "| " << setiosflags(ios::left) << setw(15) <<matkul3<< " | "; cout << setiosflags(ios::left) << setw(6) <<sks3<< " | "; cout << setiosflags(ios::left) << setw(5) << nilai3 << " | "<<endl; cout << "+-----------------+--------+-------+"<<endl; cout << "| " << setiosflags(ios::left) << setw(15) <<matkul4<< " | "; cout << setiosflags(ios::left) << setw(6) <<sks4 << " | "; cout << setiosflags(ios::left) << setw(5) << nilai4 << " | "<<endl; cout << "+-----------------+--------+-------+"<<endl; cout << "| " << setiosflags(ios::left) << setw(15) <<matkul5<< " | "; cout << setiosflags(ios::left) << setw(6) <<sks5 << " | "; cout << setiosflags(ios::left) << setw(5) << nilai5 << " | "<<endl; cout << "+-----------------+--------+-------+"<<endl; cout << "| " << setiosflags(ios::left) << setw(15) <<matkul6<< " | "; cout << setiosflags(ios::left) << setw(6) <<sks6 << " | "; cout << setiosflags(ios::left) << setw(5) << nilai6 << " | "<<endl; cout << "+-----------------+--------+-------+"<<endl; cout<<"Apakah ada lagi? ketik (y/t)"; cin>>yt; cout<<endl; if(yt=='Y'||yt=='y') { goto awal; } if(yt=='T'||yt=='t') { goto akhir; } akhir: cout <<"Done" <<endl; }

Hasil :




Share this

Related Posts

Previous
Next Post »

EmoticonEmoticon

:)
:(
=(
^_^
:D
=D
=)D
|o|
@@,
;)
:-bd
:-d
:p
:ng