progdas array

Program c++
                                        Hasil gambar untuk c++
Program c++ array


#include<iostream>
#include<stdio.h>
#include<conio.h>

using namespace std;

int main(){
string nama[100],nodaf[100],ket1[100],ket2[100];
string nosktm[100],kip[100],noser[100],dokpres[100],sergu[100],pil1[100],pil2[100];
char sktm,pres,zon,pmg,jalur[100],ul;
double mtk[100],indo[100],ing[100],ipa[100],rat[100],jum[100],jarak[100];
int i=0;

cout<<"============================================="<<endl;
cout<<"|              SMKN 1 Cimahi                |"<<endl;
cout<<"============================================="<<endl<<endl;
do{


sktm=' ';
pres=' ';
zon=' ';
pmg=' ';

ul=' ';




cout<<"1.Akademik"<<endl<<"2.Non-Akademik"<<endl;
cout<<"Pilih Jalur PPDB [1/2]: ";
cin >>jalur[i];

cout<<endl<<"============================================="<<endl;
cout<<"============================================="<<endl<<endl;


if(jalur[i]=='1'){
cout<<"No.Daftar : ";
cin>>nodaf[i];

cout<<"Nama : ";
cin.ignore(1024,'\n');
getline(cin,nama[i]);


cout<<endl<<"Nilai UNBK"<<endl<<"==========="<<endl;
cout<<"Matematika : ";
cin>>mtk[i];
cout<<"B.Indonesia : ";
cin>>indo[i];
cout<<"B.Inggris : ";
cin>>ing[i];
cout<<"IPA : ";
cin>>ipa[i];

cout<<endl<<"Pilihan Ke-1 : ";
cin>>pil1[i];
cout<<"Pilihan Ke-2 : ";
cin>>pil2[i];

jum[i]=mtk[i]+indo[i]+ing[i]+ipa[i];
rat[i]=jum[i]/4;

if(rat[i]>85)ket1[i]="Selamat Anda Diterima Di Sekolah Ini Semua Jurusan";

else if(rat[i]<86 && rat[i]>75){
ket1[i]="Selamat Anda Diterima Di Sekolah Ini di Jurusan ";
ket2[i]=pil1[i];
}

else if(rat[i]<=75 && rat[i]>60){
ket1[i]="Selamat Anda Diterima di Sekolah Ini di Jurusan ";
ket2[i]=pil2[i];
}

else if(rat[i]<61)ket1[i]="Mohon Maaf Anda Tidak Diterima di Sekolah Ini";


cin.ignore(1024,'\n');
}

else if(jalur[i]=='2'){

cout<<"Nama : ";
cin.ignore(1024,'\n');
getline(cin,nama[i]);

cout<<endl<<"SKTM"<<endl<<"=========="<<endl;
cout<<"Pilih SKTM [Y/T] : ";
cin>>sktm;

if(sktm=='y' || sktm=='Y'){
cout<<endl<<"============================================="<<endl;
cout<<"============================================="<<endl;
cout<<"No.SKTM : ";
cin>>nosktm[i];
cout<<"Kartu Indonesia Pintar [Ya/Tidak]: ";
cin>>kip[i];
if(kip[i]=="Tidak" || kip[i]=="tidak" || kip[i]=="TIDAK"){
ket1[i]="Maaf Anda Tidak Diterima Di Sekolah Ini";}
else ket1[i]="Anda Diterima Di Sekolah Ini Lewat Jalur SKTM";

}
else if(sktm=='t' || sktm=='T'){
cout<<endl<<"Prestasi"<<endl<<"=========="<<endl;
cout<<"Pilih Prestasi [Y/T] : ";
cin>>pres;

if(pres=='y' || pres=='Y'){
cout<<endl<<"============================================="<<endl;
cout<<"============================================="<<endl;
cout<<"No.Sertifikat[Ada/Tidak] : ";
cin>>noser[i];
cout<<"Dokumen : ";
cin>>dokpres[i];
if(noser[i]=="Tidak" || noser[i]=="tidak" || noser[i]=="TIDAK"){
ket1[i]="Maaf Anda Tidak Diterima Di Sekolah Ini";}
else ket1[i]="Anda Diterima Di Sekolah Ini Lewat Jalur Prestasi";
}
else if(pres=='t' || pres=='T'){
cout<<endl<<"Zonasi"<<endl<<"=========="<<endl;
cout<<"Pilih Zonasi [Y/T] : ";
cin>>zon;

if(zon=='y' || zon=='Y'){
cout<<"Jarak [KM] : ";
cin>>jarak[i];

if(jarak[i]<=1)ket1[i]="Anda Diterima Di Sekolah Ini Lewat Jalur Zonasi";
else ket1[i]="Maaf Anda Tidak Diterima Di Sekolah Ini";
}
else if(zon=='t' || zon=='T'){
cout<<endl<<"PMG"<<endl<<"=========="<<endl;
cout<<"Pilih PMG [Y/T] : ";
cin>>pmg;

if(pmg=='y' || pmg=='Y'){
cout<<"Sertifikat Guru[Ada/Tidak] : ";
cin>>sergu[i];

if(sergu[i]=="Tidak" || sergu[i]=="tidak" || sergu[i]=="TIDAK"){
ket1[i]="Maaf Anda Tidak Diterima Di Sekolah Ini";
}
else ket1[i]="Anda Diterima Di Sekolah Ini Lewat Jalur PMG";

}
else ket1[i]="Maaf Anda Tidak Memilih Jalur";

}

}

}



}

i++;

cout<<"Tambah Siswa[Y/T] : ";
cin>>ul;
system("cls");
}
while(ul=='y'||ul=='Y');

cout<<endl<<"============================================="<<endl;
cout<<"============================================="<<endl<<endl;

system("cls");

cout<<" Daftar Jalur Akademik"<<endl<<endl;


int b=1;

for(int a=0;a<i;a++){
if(jalur[a]=='1'){
cout<<b<<" . "<<nama[a];
cout<<endl<<" Rata-rata : "<<rat[a]<<endl;
cout   <<" Keterangan : "<<ket1[a]<<ket2[a]<<endl;
}
b++;
}


cout<<endl<<endl;

cout<<endl<<" Daftar Jalur Non-Akademik"<<endl<<endl;
int c=1;

for(int a=0;a<i;a++){
if(jalur[a]=='2'){
cout<<c<<" . "<<nama[a];
cout<<endl   <<" Keterangan : "<<ket1[a]<<endl;
c++;
}
}


cout<<endl<<endl;
return 0;
}

Comments

Archive

Contact Form

Send