Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <conio.h>
- #include <iostream.h>
- #include <stdio.h>
- #include <cstring.h>
- main()
- {
- string username;
- char password[10], nama[20], jurusan[20], kelas[5], kateg[5];
- cout<<"\t +-------------------------+ "<<endl;
- cout<<"\t +----| Identitas User |-------------------+"<<endl;
- cout<<"\t | +-------------------------+ |"<<endl;
- cout<<"\t | |"<<endl;
- cout<<"\t | Nama Lengkap : ";gets(nama);
- cout<<"\t | Jurusan : ";gets(jurusan);
- cout<<"\t | Kelas : ";gets(kelas);
- cout<<"\t | Kategori : ";gets(kateg);
- cout<<"\t | |"<<endl;
- cout<<"\t | Tekan ( Enter ) Untuk Melanjutkan |"<<endl;
- cout<<"\t | |"<<endl;
- cout<<"\t +--------------------------------------------------+"<<endl;
- getche();
- clrscr();
- goto attention;
- attention:
- cout<<"\t +------------------------+ "<<endl;
- cout<<"\t +----| Attention !!! |-------------------+"<<endl;
- cout<<"\t | +------------------------+ |"<<endl;
- cout<<"\t | |"<<endl;
- cout<<"\t | |"<<endl;
- cout<<"\t | Jika Ingin Menggunakan Aplikasi ini Gunakan |"<<endl;
- cout<<"\t | |"<<endl;
- cout<<"\t | Username : siswa |"<<endl;
- cout<<"\t | Password : tmkm |"<<endl;
- cout<<"\t | |"<<endl;
- cout<<"\t | Tekan ( Enter ) Untuk Melanjutkan |"<<endl;
- cout<<"\t | |"<<endl;
- cout<<"\t +-------------------------------------------------+"<<endl;
- getche();
- clrscr();
- goto login;
- login:
- cout<<"\t +------------------------+ "<<endl;
- cout<<"\t +----| Please Login |-------------------+"<<endl;
- cout<<"\t | +------------------------+ |"<<endl;
- cout<<"\t | |"<<endl;
- cout<<"\t | Username : ";cin>>username;
- cout<<"\t | Password : ";cin>>password;
- cout<<"\t | |"<<endl;
- cout<<"\t | Tekan ( Enter ) Untuk Melanjutkan |"<<endl;
- cout<<"\t | |"<<endl;
- cout<<"\t +-------------------------------------------------+"<<endl;
- if(username=="siswa" && strcmp(password, "tmkm")==0)
- {
- clrscr();
- cout<<"\t +------------------------+ "<<endl;
- cout<<"\t +----| Status Login |-------------------+"<<endl;
- cout<<"\t | +------------------------+ |"<<endl;
- cout<<"\t | |"<<endl;
- cout<<"\t | |"<<endl;
- cout<<"\t | Login SUKSES |"<<endl;
- cout<<"\t | |"<<endl;
- cout<<"\t | Tekan ( Enter ) Untuk Melanjutkan |"<<endl;
- cout<<"\t | |"<<endl;
- cout<<"\t +-------------------------------------------------+"<<endl;
- getche();
- clrscr();
- goto mainmenu;
- } else
- {
- clrscr();
- cout<<"\t +------------------------+ "<<endl;
- cout<<"\t +----| Status Login |-------------------+"<<endl;
- cout<<"\t | +------------------------+ |"<<endl;
- cout<<"\t | |"<<endl;
- cout<<"\t | |"<<endl;
- cout<<"\t | Login GAGAL |"<<endl;
- cout<<"\t | |"<<endl;
- cout<<"\t | Tekan ( Enter ) Untuk Login Kembali |"<<endl;
- cout<<"\t | |"<<endl;
- cout<<"\t +-------------------------------------------------+"<<endl;
- getche();
- clrscr();
- goto login;
- }
- mainmenu:
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement