Perogram Membuat KHS Udinus Menggunakan C++
Assalamualaikum wr wb
Apa Kabar Kawanku Semua? Semoga selalu dalam keadaan Sehat Wal Afiat ya.
Di Postingan Kedua Hazard Blog ini saya memposting tugas Dasar-Dasar Pemrograman yaitu Program Membuat KHS Udinus Menggunakan C++.
SOURCE CODE:
//judul: Program KHS Udinus
//User : Dwi Prayoga Kost Berkah, Semarang
#include <iostream>
using namespace std;
//kamus
string nama,nim;
string a = "A11.2022.14739";
string daspro,kalkulus,diskrit,orarkom,pti,pbw,dadaskom;
int nilai,nilai1,nilai2,nilai3,nilai4,nilai5,nilai6,nilai7;
int sks,sks1,sks2,sks3,sks4,sks5,sks6,sks7;
float ratarata;
char u;
//deskripsi
int main(){
do{
cout << "Input Data Terlebih Dahulu " << endl;
cout << "Nama : ";
getline(cin, nama);
cout << "NIM : ";
getline (cin,nim);
cout << "Program Studi :";
if (a[0]== 'A' && a[1]=='1' && a [2]=='1') {
cout <<"Teknik Informatika" << endl;
}
cout << "Fakultas :";
if (a[0]== 'A' && a[1]=='1' && a [2]=='1') {
cout <<"Ilmu Komputer" << endl;
}
cout << "Semester :";
if (a[0]== 'A' && a[1]=='1' && a [2]=='1') {
cout <<"Ganjil" << endl;
}
cout << "Dosen Wali :";
if (a[0]== 'A' && a[1]=='1' && a [2]=='1') {
cout <<"ETIKA KARTIKADARMA,M Kom." << endl;
}
cout <<"" << endl;
cout <<"" << endl;
cout << "Mata Kuliah Anda dan Input Nilai Anda :" << endl ;
cout << "Daspro " << daspro << " :";
cin >> nilai1;
cout << "Kalkulus " << kalkulus << " :";
cin >> nilai2;
cout << "Mat Diskrit " << diskrit << " :";
cin >> nilai3;
cout << "Orarkom " << orarkom << " :";
cin >> nilai4;
cout << "PTI " << pti << " :";
cin >> nilai5;
cout << "PBW " << pbw << " :";
cin >> nilai6;
cout << "Das Komputasi" << dadaskom << " :";
cin >> nilai7;
cout <<"" << endl;
cout <<"" << endl;
nilai=nilai1+nilai2+nilai3+nilai4+nilai5+nilai6+nilai7;
cout << "Masukkan Jumlah SKS Anda :" << endl;
cout << daspro << "Daspro :";
cin >> sks1;
cout << kalkulus << "kalkulus :";
cin >> sks2;
cout <<diskrit << "Mat Diskrit :";
cin >> sks3;
cout << orarkom << "Orarkom :";
cin >> sks4;
cout << pti << "PTI :";
cin >> sks5;
cout << pbw << "PBW :";
cin >> sks6;
cout << dadaskom << "Dasar Komputasi :";
cin >> sks7;
cout <<"" << endl;
cout <<"" << endl;
sks=sks1+sks2+sks3+sks4+sks5+sks6+sks7;
cout << "============================================================="<<endl;
cout << " INI MERUPAKAN HASIL STUDI ANDA " << endl;
cout << " Mata Kuliah " << " SKS " << "Nilai " <<endl;
cout << " \t Daspro :"<<daspro <<" \t\t"<< sks1 <<" \t"<< nilai1<<"\t"<<endl;
cout << " \t Kalkulus :"<<kalkulus <<" \t\t"<< sks2 <<" \t"<< nilai2<<"\t"<<endl;
cout << " \t Mat Diskrit :"<<diskrit <<" \t\t"<< sks3 <<" \t"<< nilai3<<"\t"<<endl;
cout << " \t Orarkom :"<<orarkom <<" \t\t"<< sks4 <<" \t"<< nilai4<<"\t"<<endl;
cout << " \t PTI :"<<pti <<" \t\t"<< sks5 <<" \t"<< nilai5<<"\t"<<endl;
cout << " \t PBW :"<<pbw <<" \t\t"<< sks6 <<" \t"<< nilai6<<"\t"<<endl;
cout << " \t Dadaskom :"<<dadaskom <<" \t\t"<< sks7 <<" \t"<< nilai7<<"\t"<<endl;
cout << "============================================================"<<endl;
ratarata=nilai/7;
cout <<"" << endl;
cout << "" << endl;
cout << " Jumlah SKS Anda : " << sks << endl;
cout << " Jumlah Nilai Anda : " << nilai << endl;
cout << " Rata-Rata Nilai Anda : " << ratarata <<endl;
cout << "" << endl;
cout <<"" << endl;
cout << "Hasil Studi Anda Telah Berhasil Apakah anda akan input data lain? ketik y apabila tidak ketik t :" << endl ;
cin >> u;
}
while (u!='t');
cout << " TERIMA KASIH" << endl ;
}
Komentar
Posting Komentar