Membuat Pseodecode, Flowchat dan Program KHS
Pseodecode
- START
- Input NIM,nama,kelas.
- Cetak tampilan menu jadwal
- Menghitung grade nilai matakuliah?
- Jika ya, maka inputkan pilihan matakuliah (1-7)
- Masukan nilai ujian
- Rumus perhitungan if (NilaiUjian >= 90) skor= 'A', if (NilaiUjian >= 70) skor= 'B', if (NilaiUjian >= 60) skor= 'C', if (NilaiUjian >= 50)skor= 'D, if (NilaiUjian <50) skor= 'E''
- Cetak grade mata kuliah
- Menghitung ulang?
- Jika iya kembali ke no.4
- Jika tidak lanjut ke menghitung IPK
- Inputkan semua nilai mutu matakuliah
- Proses perhitungan ipk=(si*3+so*3+wp*4+st*3+ak*3+mp*4+si*4)/24;
- Cetak Khs IPK
- Input Ulang?
- Jika iya, kembali ke No.1
- jika tidak, cetak "Terimakasih telah datang di skruy.blog.spot"
- END
Flowchat
Program
#include <iostream>
#include <string.h>
#include <conio.h>
#include <windows.h>
#include <stdio.h>
#include <iomanip.h>
int main()
{
char nim[10],nama[20],kelas[10],status1,status2;
double NilaiUjian;
char skor;
int pilihan1,pilihan2;
float si,so,wp,st,ak,mp,ps,ipk;
a:
cout<<"|KARTU RENCANA STUDI|"<<endl;
cout<<"=================================================================="<<endl;
cout<<"Masukan Nim :";cin>>nim;
cout<<"Masukan Nama :";cin>>nama;
cout<<"Masukan kelas :";cin>>kelas;
cout<<"Kelompok ujian:12.3C.13B"<<endl;
cout<<"Keterangan :2"<<endl;
cout<<" ====================================================================================" <<endl;
cout<<"| No | Kode | Mata kuliah | SKS |" <<endl;
cout<<" ====================================================================================" <<endl;
cout<<"| 1 | 240 | Sistem informasi manajemen | 3 |" <<endl;
cout<<" ====================================================================================" <<endl;
cout<<"| 2 | 328 | Sistem operasi | 3 |" <<endl;
cout<<" ====================================================================================" <<endl;
cout<<"| 3 | 682 | Web Programing 2 | 4 |" <<endl;
cout<<" ====================================================================================" <<endl;
cout<<"| 4 | 700 | Statistika | 3 |" <<endl;
cout<<" ====================================================================================" <<endl;
cout<<"| 5 | 851 | Akutansi Dasar & praktik | 3 |" <<endl;
cout<<" ====================================================================================" <<endl;
cout<<"| 6 | 897 | Metode Perancangan Program | 4 |" <<endl;
cout<<" ====================================================================================" <<endl;
cout<<"| 7 | 916 | Permodelan sistem berorientasi objek | 4 |" <<endl;
cout<<" ====================================================================================" <<endl;
b:
cout<<"********************************************"<<endl<<endl;
cout<<"Menghitung Grade Nilai Mata Kuliah [1-7] : ";
cin>>pilihan1;
switch(pilihan1){
case 1 :
cout<<endl<<"Sistem Informasi Manajemen"<<endl;
cout<<" Masukan Nilai Ujian : ";
cin>>NilaiUjian;
if(NilaiUjian >= 90)
skor= 'A' ;
else
if(NilaiUjian >= 70)
skor= 'B';
else
if(NilaiUjian >= 60)
skor= 'C';
else
if(NilaiUjian >= 50)
skor= 'D';
else
skor= 'E';
cout<<" Skor : "<<skor<<endl;
break;
case 2 :
cout<<endl<<"Sistem Operasi"<<endl;
cout<<" Masukan Nilai Ujian : ";
cin>>NilaiUjian;
if(NilaiUjian >= 90)
skor= 'A' ;
else
if(NilaiUjian >= 70)
skor= 'B';
else
if(NilaiUjian >= 60)
skor= 'C';
else
if(NilaiUjian >= 50)
skor= 'D';
else
skor= 'E';
cout<<" Skor : "<<skor<<endl;
break;
case 3 :
cout<<endl<<"Web Programing II"<<endl;
cout<<" Masukan Nilai Ujian : ";
cin>>NilaiUjian;
if(NilaiUjian >= 90)
skor= 'A' ;
else
if(NilaiUjian >= 70)
skor= 'B';
else
if(NilaiUjian >= 60)
skor= 'C';
else
if(NilaiUjian >= 50)
skor= 'D';
else
skor= 'E';
cout<<" Skor : "<<skor<<endl;
break;
case 4 :
cout<<endl<<"Statistik"<<endl;
cout<<" Masukan Nilai Ujian : ";
cin>>NilaiUjian;
if(NilaiUjian >= 90)
skor= 'A' ;
else
if(NilaiUjian >= 70)
skor= 'B';
else
if(NilaiUjian >= 60)
skor= 'C';
else
if(NilaiUjian >= 50)
skor= 'D';
else
skor= 'E';
cout<<" Skor : "<<skor<<endl;
case 5 :
cout<<endl<<"Akutansi Dasar Dan Praktik"<<endl;
cout<<" Masukan Nilai Ujian : ";
cin>>NilaiUjian;
if(NilaiUjian >= 90)
skor= 'A' ;
else
if(NilaiUjian >= 70)
skor= 'B';
else
if(NilaiUjian >= 60)
skor= 'C';
else
if(NilaiUjian >= 50)
skor= 'D';
else
skor= 'E';
cout<<" Skor : "<<skor<<endl;
break;
case 6 :
cout<<endl<<"Metode Perancangan Program"<<endl;
cout<<" Masukan Nilai Ujian : ";
cin>>NilaiUjian;
if(NilaiUjian >= 90)
skor= 'A' ;
else
if(NilaiUjian >= 70)
skor= 'B';
else
if(NilaiUjian >= 60)
skor= 'C';
else
if(NilaiUjian >= 50)
skor= 'D';
else
skor= 'E';
cout<<" Skor : "<<skor<<endl;
break;
case 7 :
cout<<endl<<"Permodelan Sistem Berorientasi Objek"<<endl;
cout<<" Masukan Nilai Ujian : ";
cin>>NilaiUjian;
if(NilaiUjian >= 90)
skor= 'A' ;
else
if(NilaiUjian >= 70)
skor= 'B';
else
if(NilaiUjian >= 60)
skor= 'C';
else
if(NilaiUjian >= 50)
skor= 'D';
else
skor= 'E';
cout<<" Skor : "<<skor<<endl;
break;
default :
cout<<endl<<"Pilihannya Cuman 1-7 looh"<<endl;
}
cout<<"\n\n Menghitung lagi? (yes=y / menghitung ipk=n) : ";cin>>status1;
if(status1 =='y' || status1 =='Y')
goto b;
else
goto c;
c:
cout<<"**************PROGRAM MENGHITUNG IPK**************"<<endl<<endl;
cout<<"**************Menghitung IPK MAHASISWA*************"<<endl<<endl;
cout<<"============[Nilai mutu adalah SKS*nilai mata kuliah]============="<<endl;
cout<<"masukan nilai mutu Sistem informasi manajemen =";cin>>si;
cout<<"masukan nilai mutu Sistem operasi =";cin>>so;
cout<<"masukan nilai mutu web programing II =";cin>>wp;
cout<<"masukan nilai mutu statistika =";cin>>st;
cout<<"masukan nilai mutu akutansi dasar dan praktek =";cin>>ak;
cout<<"masukan nilai mutu metode perancangan perogram =";cin>>mp;
cout<<"masukan nilai mutu permodelan sistem berorientasi objek =";cin>>ps;
ipk=(si*3+so*3+wp*4+st*3+ak*3+mp*4+si*4)/24;
cout<<endl;
cout<<" NIM : "<<nim<<endl;
cout<<" NAMA : "<<nama<<endl;
cout<<" Kelas : "<<kelas<<endl;
cout<<"=================================================================================== "<<endl;
cout<<" NO | MATA KULIAH | JUMLAH SKS | NILAI MUTU "<<endl;
cout<<"=================================================================================== "<<endl;
cout<<" 1 | Sistem Informasi manajemen | 2 | "<<si<<endl;
cout<<" 2 | Sistem operasi | 4 | "<<so<<endl;
cout<<" 3 | Web Programing | 3 | "<<wp<<endl;
cout<<" 4 | Statistika | 3 | "<<st<<endl;
cout<<" 5 | Akutansi dasar&praktek | 4 | "<<ak<<endl;
cout<<" 6 | Metode Perancangan perogram | 1 | "<<mp<<endl;
cout<<" 7 | permodelan sistem berorientasi objek | 4 | "<<ps<<endl;
cout<<"=================================================================================== "<<endl;
cout<<" INDEKS PRESTASI KOMULATIF | "<<ipk<<endl;
cout<<"\n\n Kembali ke menu? (yes=y / No=n) : "; cin>>status2;
if(status2 =='y' || status2 =='Y')
goto a;
else
goto end;
clrscr();
end:
cout<<"\n\n ===============================================";
cout<<"\n Terimakasih Atas Kunjungannya Di skruy.blogspot." ;
cout<<"\n =================================================";
//jika garis tidak rapih bisa di rapihkan sendiri ya :)
getch();
}
#include <iostream>
#include <string.h>
#include <conio.h>
#include <windows.h>
#include <stdio.h>
#include <iomanip.h>
int main()
{
char nim[10],nama[20],kelas[10],status1,status2;
double NilaiUjian;
char skor;
int pilihan1,pilihan2;
float si,so,wp,st,ak,mp,ps,ipk;
a:
cout<<"|KARTU RENCANA STUDI|"<<endl;
cout<<"=================================================================="<<endl;
cout<<"Masukan Nim :";cin>>nim;
cout<<"Masukan Nama :";cin>>nama;
cout<<"Masukan kelas :";cin>>kelas;
cout<<"Kelompok ujian:12.3C.13B"<<endl;
cout<<"Keterangan :2"<<endl;
cout<<" ====================================================================================" <<endl;
cout<<"| No | Kode | Mata kuliah | SKS |" <<endl;
cout<<" ====================================================================================" <<endl;
cout<<"| 1 | 240 | Sistem informasi manajemen | 3 |" <<endl;
cout<<" ====================================================================================" <<endl;
cout<<"| 2 | 328 | Sistem operasi | 3 |" <<endl;
cout<<" ====================================================================================" <<endl;
cout<<"| 3 | 682 | Web Programing 2 | 4 |" <<endl;
cout<<" ====================================================================================" <<endl;
cout<<"| 4 | 700 | Statistika | 3 |" <<endl;
cout<<" ====================================================================================" <<endl;
cout<<"| 5 | 851 | Akutansi Dasar & praktik | 3 |" <<endl;
cout<<" ====================================================================================" <<endl;
cout<<"| 6 | 897 | Metode Perancangan Program | 4 |" <<endl;
cout<<" ====================================================================================" <<endl;
cout<<"| 7 | 916 | Permodelan sistem berorientasi objek | 4 |" <<endl;
cout<<" ====================================================================================" <<endl;
b:
cout<<"********************************************"<<endl<<endl;
cout<<"Menghitung Grade Nilai Mata Kuliah [1-7] : ";
cin>>pilihan1;
switch(pilihan1){
case 1 :
cout<<endl<<"Sistem Informasi Manajemen"<<endl;
cout<<" Masukan Nilai Ujian : ";
cin>>NilaiUjian;
if(NilaiUjian >= 90)
skor= 'A' ;
else
if(NilaiUjian >= 70)
skor= 'B';
else
if(NilaiUjian >= 60)
skor= 'C';
else
if(NilaiUjian >= 50)
skor= 'D';
else
skor= 'E';
cout<<" Skor : "<<skor<<endl;
break;
case 2 :
cout<<endl<<"Sistem Operasi"<<endl;
cout<<" Masukan Nilai Ujian : ";
cin>>NilaiUjian;
if(NilaiUjian >= 90)
skor= 'A' ;
else
if(NilaiUjian >= 70)
skor= 'B';
else
if(NilaiUjian >= 60)
skor= 'C';
else
if(NilaiUjian >= 50)
skor= 'D';
else
skor= 'E';
cout<<" Skor : "<<skor<<endl;
break;
case 3 :
cout<<endl<<"Web Programing II"<<endl;
cout<<" Masukan Nilai Ujian : ";
cin>>NilaiUjian;
if(NilaiUjian >= 90)
skor= 'A' ;
else
if(NilaiUjian >= 70)
skor= 'B';
else
if(NilaiUjian >= 60)
skor= 'C';
else
if(NilaiUjian >= 50)
skor= 'D';
else
skor= 'E';
cout<<" Skor : "<<skor<<endl;
break;
case 4 :
cout<<endl<<"Statistik"<<endl;
cout<<" Masukan Nilai Ujian : ";
cin>>NilaiUjian;
if(NilaiUjian >= 90)
skor= 'A' ;
else
if(NilaiUjian >= 70)
skor= 'B';
else
if(NilaiUjian >= 60)
skor= 'C';
else
if(NilaiUjian >= 50)
skor= 'D';
else
skor= 'E';
cout<<" Skor : "<<skor<<endl;
case 5 :
cout<<endl<<"Akutansi Dasar Dan Praktik"<<endl;
cout<<" Masukan Nilai Ujian : ";
cin>>NilaiUjian;
if(NilaiUjian >= 90)
skor= 'A' ;
else
if(NilaiUjian >= 70)
skor= 'B';
else
if(NilaiUjian >= 60)
skor= 'C';
else
if(NilaiUjian >= 50)
skor= 'D';
else
skor= 'E';
cout<<" Skor : "<<skor<<endl;
break;
case 6 :
cout<<endl<<"Metode Perancangan Program"<<endl;
cout<<" Masukan Nilai Ujian : ";
cin>>NilaiUjian;
if(NilaiUjian >= 90)
skor= 'A' ;
else
if(NilaiUjian >= 70)
skor= 'B';
else
if(NilaiUjian >= 60)
skor= 'C';
else
if(NilaiUjian >= 50)
skor= 'D';
else
skor= 'E';
cout<<" Skor : "<<skor<<endl;
break;
case 7 :
cout<<endl<<"Permodelan Sistem Berorientasi Objek"<<endl;
cout<<" Masukan Nilai Ujian : ";
cin>>NilaiUjian;
if(NilaiUjian >= 90)
skor= 'A' ;
else
if(NilaiUjian >= 70)
skor= 'B';
else
if(NilaiUjian >= 60)
skor= 'C';
else
if(NilaiUjian >= 50)
skor= 'D';
else
skor= 'E';
cout<<" Skor : "<<skor<<endl;
break;
default :
cout<<endl<<"Pilihannya Cuman 1-7 looh"<<endl;
}
cout<<"\n\n Menghitung lagi? (yes=y / menghitung ipk=n) : ";cin>>status1;
if(status1 =='y' || status1 =='Y')
goto b;
else
goto c;
c:
cout<<"**************PROGRAM MENGHITUNG IPK**************"<<endl<<endl;
cout<<"**************Menghitung IPK MAHASISWA*************"<<endl<<endl;
cout<<"============[Nilai mutu adalah SKS*nilai mata kuliah]============="<<endl;
cout<<"masukan nilai mutu Sistem informasi manajemen =";cin>>si;
cout<<"masukan nilai mutu Sistem operasi =";cin>>so;
cout<<"masukan nilai mutu web programing II =";cin>>wp;
cout<<"masukan nilai mutu statistika =";cin>>st;
cout<<"masukan nilai mutu akutansi dasar dan praktek =";cin>>ak;
cout<<"masukan nilai mutu metode perancangan perogram =";cin>>mp;
cout<<"masukan nilai mutu permodelan sistem berorientasi objek =";cin>>ps;
ipk=(si*3+so*3+wp*4+st*3+ak*3+mp*4+si*4)/24;
cout<<endl;
cout<<" NIM : "<<nim<<endl;
cout<<" NAMA : "<<nama<<endl;
cout<<" Kelas : "<<kelas<<endl;
cout<<"=================================================================================== "<<endl;
cout<<" NO | MATA KULIAH | JUMLAH SKS | NILAI MUTU "<<endl;
cout<<"=================================================================================== "<<endl;
cout<<" 1 | Sistem Informasi manajemen | 2 | "<<si<<endl;
cout<<" 2 | Sistem operasi | 4 | "<<so<<endl;
cout<<" 3 | Web Programing | 3 | "<<wp<<endl;
cout<<" 4 | Statistika | 3 | "<<st<<endl;
cout<<" 5 | Akutansi dasar&praktek | 4 | "<<ak<<endl;
cout<<" 6 | Metode Perancangan perogram | 1 | "<<mp<<endl;
cout<<" 7 | permodelan sistem berorientasi objek | 4 | "<<ps<<endl;
cout<<"=================================================================================== "<<endl;
cout<<" INDEKS PRESTASI KOMULATIF | "<<ipk<<endl;
cout<<"\n\n Kembali ke menu? (yes=y / No=n) : "; cin>>status2;
if(status2 =='y' || status2 =='Y')
goto a;
else
goto end;
clrscr();
end:
cout<<"\n\n ===============================================";
cout<<"\n Terimakasih Atas Kunjungannya Di skruy.blogspot." ;
cout<<"\n =================================================";
//jika garis tidak rapih bisa di rapihkan sendiri ya :)
getch();
}
CONTOH SAAT RUNING PROGRAM
Reference : Skruy Blog
1 komentar:
komentarMantaps gan..:D
Reply