fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. struct Passengers {
  5. string name;
  6. string phone;
  7. string email;
  8. string gender;
  9. };
  10.  
  11. struct Ticket {
  12. string airlines;
  13. int ticket_id;
  14. string from;
  15. string to;
  16. string airport;
  17. int flight_code;
  18. string boarding_time;
  19. int seat;
  20. };
  21.  
  22. int binarySearch() { // mencari from dan to dari kode;
  23.  
  24. return -1;
  25. }
  26.  
  27. pair <string, pair<string, string>> airports[25] = {
  28. {"Soekarno-Hatta International Airport", {"CGK", "Jakarta"}},
  29. {"Ngurah Rai International Airport", {"DPS", "Denpasar"}},
  30. {"Juanda International Airport", {"SUB", "Surabaya"}},
  31. {"Sultan Hasanuddin International Airport", {"UPG", "Makassar"}},
  32. {"Kualanamu International Airport", {"KNO", "Medan"}},
  33. {"Yogyakarta International Airport", {"YIA", "Yogyakarta"}},
  34. {"Halim Perdanakusuma Airport", {"HLP", "Jakarta"}},
  35. {"Hang Nadim International Airport", {"BTH", "Batam"}},
  36. {"Sultan Mahmud Badaruddin II International Airport", {"PLM", "Palembang"}},
  37. {"Ahmad Yani International Airport", {"SRG", "Semarang"}},
  38. {"Husein Sastranegara International Airport", {"BDO", "Bandung"}},
  39. {"Supadio International Airport", {"PNK", "Pontianak"}},
  40. {"Zainuddin Abdul Madjid International Airport", {"LOP", "Praya"}},
  41. {"Sultan Syarif Kasim II International Airport", {"PKU", "Pekanbaru"}},
  42. {"Minangkabau International Airport", {"PDG", "Padang"}},
  43. {"Syamsudin Noor International Airport", {"BDJ", "Banjarmasin"}},
  44. {"Sam Ratulangi International Airport", {"MDC", "Manado"}},
  45. {"Radin Intan II International Airport", {"TKG", "Bandar Lampung"}},
  46. {"Adi Soemarmo International Airport", {"SOC", "Solo"}},
  47. {"Sentani International Airport", {"DJJ", "Jayapura"}},
  48. {"Pattimura Airport", {"AMQ", "Ambon"}},
  49. {"Sultan Iskandar Muda International Airport", {"BTJ", "Aceh"}},
  50. {"Samarinda International Airport", {"AAP", "Samarinda"}},
  51. {"Frans Kasiepo Airport", {"BIK", "Biak"}},
  52. {"Mozes Kilangin Aiport", {"TIM", "Timika"}}
  53. };
  54.  
  55. void greetingMsg() {
  56. string greeting_head = "\033[3m\033[1m\033[4mSelamat Datang di Aeronaut!\033[0m\n";
  57. string greeting_next = "Pesan tiket cepat, perjalanan hebat!\n\n";
  58. cout << greeting_head << greeting_next;
  59. }
  60.  
  61. void lanjutOrNot() {
  62. cout << "Menu:\n 1. Lanjut\n 2. Keluar\nPilih Menu: ";
  63. int in;
  64. cin >> in;
  65. if(in != 1) {
  66. exit(0);
  67. }
  68. }
  69.  
  70. int main() {
  71. greetingMsg();
  72. lanjutOrNot();
  73.  
  74. cout << "Bersambung...";
  75. }
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
Selamat Datang di Aeronaut!
Pesan tiket cepat, perjalanan hebat!

Menu:
   1. Lanjut
   2. Keluar
Pilih Menu: