#include <iostream>
#include <conio.h>
using namespace std;
char nama[20], pangkat[15], password[4], NRP[13];
//deklarasi fungsi
void data_personel_Tamtama()
{
cout<<"==============================================\n"<<endl;
cout<<"Nama :
Andri"<<endl;
cout<<"Pangkat :
Prada"<<endl;
cout<<"Jabatan :
Sniper"<<endl;
cout<<"Senjata :
SS1"<<endl;
cout<<"Nomor Senjata :
4211644"<<endl;
cout<<"==============================================\n"<<endl;
}
void data_personel_Bintara()
{
cout<<"==============================================\n"<<endl;
cout<<"Nama :
Rahmat"<<endl;
cout<<"Pangkat :
Serda"<<endl;
cout<<"Jabatan :
Komandan Regu"<<endl;
cout<<"Senjata :
SS1"<<endl;
cout<<"Nomor Senjata :
4211645"<<endl;
cout<<"==============================================\n"<<endl;
}
void data_personel_Perwira()
{
cout<<"==============================================\n"<<endl;
cout<<"Nama :
Dwi Yanto"<<endl;
cout<<"Pangkat :
Lettu"<<endl;
cout<<"Jabatan :
Komandan Pleton"<<endl;
cout<<"Senjata :
Pistol P1"<<endl;
cout<<"Nomor Senjata :
776229"<<endl;
cout<<"==============================================\n"<<endl;
}
//main utama atau fungsi utama
int main()
{
atas:
for (int a=0; a<2; a++) {
cout<<" S E L A M A T D A T A N G "<<endl;
cout<<"===========================================\n";
cout<<"
Silahkan masukkan User Name, Pangkat & Password"<<endl;
cout<<"
UserName : ";cin>>nama;
cout<<"
Pangkat : "
;cin>>pangkat;
cout<<" NRP : ";cin>>NRP;
cout<<"
Password : "
;cin>>password;
if (strcmp(password,"RAIDER")==0)
{
system("cls");
cout<<"Daftar pemilik senjata Yonif 70000 Raider"<<endl;
cout<<"===========================================\n";
data_personel_Tamtama();
data_personel_Bintara();
data_personel_Perwira();
//=============================================
cout<<" Data ini bersifat rahasia...!"
cout<<" Tekan Sembarang untuk keluar...!" ;
goto bawah;
}
else
{
cout<<" Password Salah...!" ;
system
("pause");
system("cls");
}
}
cout<<"Kamu
bukan petugas gudang senjata....!"<<endl;
bawah:
getch();
}
Vidio tutorialnya:
No comments:
Post a Comment