Mari kita lihat program selengkapnya:
- #include<iostream.h>
- int main()
- {
- int data_mhs;
- cout<<"Masukan NIM : ";
- cin>>data_mhs;
- switch(data_mhs)
- {
- case 11320101:
- cout<<"\nNAMA : AHMAD AFANDI"<<endl;
- cout<<"KELAS : I-3"<<endl;
- cout<<"ALAMAT : JL.Setia Budi Kom Tasbi II "<<endl;
- cout<<"IP TORAL : 3,80 "<<endl;
- break;
- case 11320102:
- cout<<"\nNAMA : LYCAN SITEPU"<<endl;
- cout<<"KELAS : I-3"<<endl;
- cout<<"ALAMAT : JL.Fungsi C++ Gg.Argumen "<<endl;
- cout<<"IP TORAL : 2,80 "<<endl;
- break;
- case 11320103:
- cout<<"\nNAMA : MIRANA"<<endl;
- cout<<"KELAS : I-3"<<endl;
- cout<<"ALAMAT : JL.Array Gg.Larik "<<endl;
- cout<<"IP TORAL : 2,75 "<<endl;
- break;
- case 11320104:
- cout<<"\nNAMA : ZEUS"<<endl;
- cout<<"KELAS : I-3"<<endl;
- cout<<"ALAMAT : JL.Semangat Program "<<endl;
- cout<<"IP TORAL : 3,00 "<<endl;
- break;
- case 11320105:
- cout<<"\nNAMA : RAZOR"<<endl;
- cout<<"KELAS : I-3"<<endl;
- cout<<"ALAMAT : JL.Kambing No.1 "<<endl;
- cout<<"IP TORAL : 3,02 "<<endl;
- break;
- }
- return 0;
- }
1 komentar:
tutorial yang bagus, saya sadur ulang ya mas :)
http://www.antsbigprojects.blogspot.com/
Posting Komentar
untuk pertanyaan dan komentar silahkan pada form dibawah ini.