Program Kleene Closure (Kelas 3L)

Program Kleene Closure bagi kelas 3L.

  1. Silahkan menuliskan program Kleene Closure menggunakan bahasa apapun baik Java, C, C++, Pascal, Basic, dan sebagainya di bagian komentar.
  2. Jangan lupa menuliskan nama dan NIM anda.
  3. Ingat perhatikan baik-baik kelas anda, selain program / koding tuliskan hasilnya dari alur program yang anda tulis.

Perhatian : komentar tidak akan ditampilkan sebelum disetujui.

74 Responses

  1. #include
    #include
    #include

    void closure1();
    void closure2();
    int menu();

    main() {
    int p;
    p=menu();
    clrscr();
    switch(p) {
    case 1:
    closure1();
    break;
    case 2:
    closure2();
    break;
    case 3:
    exit(0);
    }
    return 0;
    }

    void closure1() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    coutx;
    couty;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    menu();
    }

    void closure2() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    coutx;
    couty;
    coutz;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    menu();
    }
    int menu(void) {
    int n;
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"———————-"<<endl;
    cout<<"Nama \t\t: Luthfi Bahrun."<<endl;
    cout<<"Kelas/ NIM\t: S1-TI-3L/ 09.11.3405"<<endl;
    cout<<"———————————-"<<endl;
    cout<<"\n1. Input 2 Alphabet"<<endl;
    cout<<"2. Input 3 Alphabet"<<endl;
    cout<<"3. Exit"<<endl;
    coutn;
    clrscr();
    return n;
    }

  2. //nama : Feri perdana aquwin chandra
    //kelas : S1-TI-3L
    //nim : 09.11.3433

    #include
    #include
    #include

    void closure1();
    void closure2();
    int menu();

    main() {
    int p;
    p=menu();
    clrscr();
    switch(p) {
    case 1:
    closure1();
    break;
    case 2:
    closure2();
    break;
    case 3:
    exit(0);
    }
    return 0;
    }

    void closure1() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    menu();
    }

    void closure2() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    menu();
    }
    int menu(void) {
    int n;
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"———————-"<<endl;
    cout<<"Nama \t\t: Feri perdana aquwin chandra"<<endl;
    cout<<"Kelas/ NIM\t: S1-TI-3L/ 09.11.3433"<<endl;
    cout<<"———————————-"<<endl;
    cout<<"\n1. Input 2 Alphabet"<<endl;
    cout<<"2. Input 3 Alphabet"<<endl;
    cout<<"3. Exit"<<endl;
    cout<>n;
    clrscr();
    return n;
    }

  3. //Nama : Endah Tiaranita
    //Kelas : S1TI – 3L
    //Nim : 09.11.3440

    #include
    #include
    #include

    void closure1();
    void closure2();
    int menu();

    main() {
    int p;
    p=menu();
    clrscr();
    switch(p) {
    case 1:
    closure1();
    break;
    case 2:
    closure2();
    break;
    case 3:
    exit(0);
    }
    return 0;
    }

    void closure1() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    menu();
    }

    void closure2() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    menu();
    }
    int menu(void) {
    int n;
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"———————-"<<endl;
    cout<<"Nama \t\t: Endah tiaranita"<<endl;
    cout<<"Kelas/ NIM\t: S1TI – 3L/ 09.11.3440"<<endl;
    cout<<"———————————-"<<endl;
    cout<<"\n1. Input 2 Alphabet"<<endl;
    cout<<"2. Input 3 Alphabet"<<endl;
    cout<<"3. Exit"<<endl;
    cout<>n;
    clrscr();
    return n;
    }

  4. #include
    #include
    #include

    void closure1();
    void closure2();
    int menu();

    main() {
    int p;
    p=menu();
    clrscr();
    switch(p) {
    case 1:
    closure1();
    break;
    case 2:
    closure2();
    break;
    case 3:
    exit(0);
    }
    return 0;
    }

    void closure1() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    menu();
    }

    void closure2() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    menu();
    }
    int menu(void) {
    int n;
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"———————-"<<endl;
    cout<<"Nama \t\t: Eko Zunantono."<<endl;
    cout<<"Kelas/ NIM\t: S1-TI-3L/ 09.11.3438"<<endl;
    cout<<"———————————-"<<endl;
    cout<<"\n1. Input 2 Alphabet"<<endl;
    cout<<"2. Input 3 Alphabet"<<endl;
    cout<<"3. Exit"<<endl;
    cout<>n;
    clrscr();
    return n;
    }

  5. #include
    #include
    #include
    char a[5];
    void program();
    void tanya();
    void main(){
    program();
    getch();
    }
    void program(){
    int i ;
    char x,y;
    cout<<"Nama : Purw Adityo"<<endl;
    cout<<"NIM : 09.11.3427"<<endl;
    cout<<"Kelas : S1 TI 3L"<<endl;
    cout<<"——————————————————-"<<endl;
    cout<<"Silakan masukan 2 alphabet (huruf/angka)"<<endl;
    cout<<"NB : Batasan cuma sampai dua"<<endl;
    cout<<"——————————————————-"<<endl;
    for(i=1;i<=2;i++)
    {
    cout<<"Input alphabet ke – "<<ia[i];
    }
    cout<<"——————————————————-"<<endl;
    cout<<endl;
    cout<<"Kleene closure { "<<x<<","<<y<<" }* = {"<<x<<","<<y<<","<<x<<""<<x<<","<<y<<""<<y<<","<<x<<""<<y<<","<<y<<""<<x<<"}"<<endl;
    cout<<endl;
    tanya();
    }
    void tanya()
    {
    int n;
    cout<<"——————————————————-"<<endl;
    coutn;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<"Salah, coba pilih yang bener. . !"<<endl;
    }
    }

  6. #include
    #include
    #include
    char a[5];
    void program();
    void tanya();
    void main(){
    program();
    getch();
    }
    void program(){
    int i ;
    char x,y;
    cout<<"Nama : Purwo Adityo"<<endl;
    cout<<"NIM : 09.11.3427"<<endl;
    cout<<"Kelas : S1 TI 3L"<<endl;
    cout<<"——————————————————-"<<endl;
    cout<<"Silakan masukan 2 alphabet (huruf/angka)"<<endl;
    cout<<"NB : Batasan cuma sampai dua"<<endl;
    cout<<"——————————————————-"<<endl;
    for(i=1;i<=2;i++)
    {
    cout<<"Input alphabet ke – "<<ia[i];
    }
    cout<<"——————————————————-"<<endl;
    cout<<endl;
    cout<<"Kleene closure { "<<x<<","<<y<<" }* = {"<<x<<","<<y<<","<<x<<""<<x<<","<<y<<""<<y<<","<<x<<""<<y<<","<<y<<""<<x<<"}"<<endl;
    cout<<endl;
    tanya();
    }
    void tanya()
    {
    int n;
    cout<<"——————————————————-"<<endl;
    coutn;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<"Salah, coba pilih yang bener. . !"<<endl;
    }
    }

  7. #include
    #include
    #include

    char a[5];
    void program();
    void tanya();

    void main(){
    program();
    getch();
    }

    void program(){
    int i ;
    char x,y;
    cout<<"Nama : Nur Hariyadi"<<endl;
    cout<<"NIM : 09.11.3390"<<endl;
    cout<<"Kelas : S1 TI 3L"<<endl;
    cout<<"——————————————————-"<<endl;
    cout<<"Silakan masukan 2 alphabet (huruf/angka)"<<endl;
    cout<<"NB : Batasan cuma sampai dua"<<endl;
    cout<<"——————————————————-"<<endl;

    for(i=1;i<=2;i++)
    {
    cout<<"Input alphabet ke – "<<ia[i];
    }

    cout<<"——————————————————-"<<endl;
    cout<<endl;
    cout<<"Kleene closure { "<<x<<","<<y<<" }* = {"<<x<<","<<y<<","<<x<<""<<x<<","<<y<<""<<y<<","<<x<<""<<y<<","<<y<<""<<x<<"}"<<endl;
    cout<<endl;
    tanya();
    }

    void tanya()
    {

    int n;
    cout<<"——————————————————-"<<endl;
    coutn;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<"wrong, coba pilih yang bener. . !"<<endl;
    }
    }

  8. #include
    #include
    #include

    char a[5];
    void program();
    void tanya();

    void main(){
    program();
    getch();
    }

    void program(){
    int i ;
    char x,y;
    cout<<"Nama : Nur Hariyadi"<<endl;
    cout<<"NIM : 09.11.3390"<<endl;
    cout<<"Kelas : S1 TI 3L"<<endl;
    cout<<"——————————————————-"<<endl;
    cout<<"Silakan masukan 2 alphabet (huruf/angka)"<<endl;
    cout<<"NB : Batasan cuma sampai dua"<<endl;
    cout<<"——————————————————-"<<endl;

    for(i=1;i<=2;i++)
    {
    cout<<"Input alphabet ke – "<<i<>a[i];
    }

    cout<<"——————————————————-"<<endl;
    cout<<endl;
    cout<<"Kleene closure { "<<x<<","<<y<<" }* = {"<<x<<","<<y<<","<<x<<""<<x<<","<<y<<""<<y<<","<<x<<""<<y<<","<<y<<""<<x<<"}"<<endl;
    cout<<endl;
    tanya();
    }

    void tanya()
    {

    int n;
    cout<<"——————————————————-"<<endl;
    cout<>n;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<"Salah, mencoba pilih yang bener. . !"<<endl;
    }
    }

  9. #include
    #include
    #include

    char a[5];
    void program();
    void tanya();

    void main(){
    program();
    getch();
    }

    void program(){
    int i ;
    char x,y;
    cout<<"Nama : Nur Hariyadi"<<endl;
    cout<<"NIM : 09.11.3390"<<endl;
    cout<<"Kelas : S1 TI 3L"<<endl;
    cout<<"——————————————————-"<<endl;
    cout<<"Silakan masukan 2 alphabet (huruf/angka)"<<endl;
    cout<<"NB : Batasan cuma sampai dua"<<endl;
    cout<<"——————————————————-"<<endl;

    for(i=1;i<=2;i++)
    {
    cout<<"Input alphabet ke – "<<i<>a[i];
    }

    cout<<"——————————————————-"<<endl;
    cout<<endl;
    cout<<"Kleene closure { "<<x<<","<<y<<" }* = {"<<x<<","<<y<<","<<x<<""<<x<<","<<y<<""<<y<<","<<x<<""<<y<<","<<y<<""<<x<<"}"<<endl;
    cout<<endl;
    tanya();
    }

    void tanya()
    {

    int n;
    cout<<"——————————————————-"<<endl;
    cout<>n;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<"Songong, coba pilih yang bener. . !"<<endl;
    }
    }

  10. #include
    #include
    #include

    char a[5];
    void program();
    void tanya();

    void main(){
    program();
    getch();
    }

    void program(){
    int i ;
    char x,y;
    cout<<"Nama : Nur Hariyadi"<<endl;
    cout<<"NIM : 09.11.3390"<<endl;
    cout<<"Kelas : S1 TI 3L"<<endl;
    cout<<"——————————————————-"<<endl;
    cout<<"Silakan masukan 2 alphabet (huruf/angka)"<<endl;
    cout<<"NB : Batasan cuma sampai dua"<<endl;
    cout<<"——————————————————-"<<endl;

    for(i=1;i<=2;i++)
    {
    cout<<"Input alphabet ke – "<<i<>a[i];
    }

    cout<<"——————————————————-"<<endl;
    cout<<endl;
    cout<<"Kleene closure { "<<x<<","<<y<<" }* = {"<<x<<","<<y<<","<<x<<""<<x<<","<<y<<""<<y<<","<<x<<""<<y<<","<<y<<""<<x<<"}"<<endl;
    cout<<endl;
    tanya();
    }

    void tanya()
    {

    int n;
    cout<<"——————————————————-"<<endl;
    cout<>n;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<Songong, coba pilih yang bener. . !"<<endl;
    }
    }

  11. #include
    #include
    #include

    char a[5];
    void program();
    void tanya();

    void main(){
    program();
    getch();
    }

    void program(){
    int i ;
    char x,y;
    cout<<"Nama : Nur Hariyadi"<<endl;
    cout<<"NIM : 09.11.3390"<<endl;
    cout<<"Kelas : S1 TI 3L"<<endl;
    cout<<"——————————————————-"<<endl;
    cout<<"Silakan masukan 2 alphabet (huruf/angka)"<<endl;
    cout<<"NB : Batasan cuma sampai dua"<<endl;
    cout<<"——————————————————-"<<endl;

    for(i=1;i<=2;i++)
    {
    cout<<"Input alphabet ke – "<<i<>a[i];
    }

    cout<<"——————————————————-"<<endl;
    cout<<endl;
    cout<<"Kleene closure { "<<x<<","<<y<<" }* = {"<<x<<","<<y<<","<<x<<""<<x<<","<<y<<""<<y<<","<<x<<""<<y<<","<<y<<""<<x<<"}"<<endl;
    cout<<endl;
    tanya();
    }

    void tanya()
    {

    int n;
    cout<<"——————————————————-"<<endl;
    cout<>n;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<"Salah, coba pilih yang bener. . !"<<endl;
    }
    }

  12. #include
    #include
    #include

    char a[5];
    void program();
    void tanya();

    void main(){
    program();
    getch();
    }

    void program(){
    int i ;
    char x,y;
    cout<<"Nama : Nur Hariyadi"<<endl;
    cout<<"NIM : 09.11.3390"<<endl;
    cout<<"Kelas : S1 TI 3L"<<endl;
    cout<<"——————————————————-"<<endl;
    cout<<"Silakan masukan 2 alphabet (huruf/angka)"<<endl;
    cout<<"NB : Batasan cuma sampai dua"<<endl;
    cout<<"——————————————————-"<<endl;

    for(i=1;i<=2;i++)
    {
    cout<<"Input alphabet ke – "<<i<>a[i];
    }

    cout<<"——————————————————-"<<endl;
    cout<<endl;
    cout<<"Kleene closure { "<<x<<","<<y<<" }* = {"<<x<<","<<y<<","<<x<<""<<x<<","<<y<<""<<y<<","<<x<<""<<y<<","<<y<<""<<x<<"}"<<endl;
    cout<<endl;
    tanya();
    }

    void tanya()
    {

    int n;
    cout<<"——————————————————-"<<endl;
    cout<>n;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<"Salah, coba pilih yang bener. . !"<<endl;
    }
    }

    • #include
      #include
      #include
      char a[5];
      void program();
      void tanya();
      void main(){
      program();
      getch();
      }
      void program(){
      int i ;
      char x,y;
      cout<<"Nama : Purwa Adityo"<<endl;
      cout<<"NIM : 09.11.3427"<<endl;
      cout<<"Kelas : S1 TI 3L"<<endl;
      cout<<"——————————————————-"<<endl;
      cout<<"Silakan masukan 2 alphabet (huruf/angka)"<<endl;
      cout<<"NB : Batasan cuma sampai dua"<<endl;
      cout<<"——————————————————-"<<endl;
      for(i=1;i<=2;i++)
      {
      cout<<"Input alphabet ke – "<<ia[i];
      }
      cout<<"——————————————————-"<<endl;
      cout<<endl;
      cout<<"Kleene closure { "<<x<<","<<y<<" }* = {"<<x<<","<<y<<","<<x<<""<<x<<","<<y<<""<<y<<","<<x<<""<<y<<","<<y<<""<<x<<"}"<<endl;
      cout<<endl;
      tanya();
      }
      void tanya()
      {
      int n;
      cout<<"——————————————————-"<<endl;
      coutn;
      clrscr();
      switch(n)
      {
      case 1:
      program();
      break;
      case 2:
      exit(0);
      default:
      cout<<"Salah, coba pilih yang bener. . !"<<endl;
      }
      }

  13. #include
    #include
    #include

    void utama(void);
    int akhir(char );
    void closure1();
    void closure2();
    void closure3();

    void main()
    {
    utama();
    getch();
    }

    void utama(void)
    {
    int n;
    cout<<"—————————————————-"<<endl;
    cout<<" Nama \t\t: Aditya Widiatmoko"<<endl;
    cout<<" Kelas/ NIM\t: S1-TI-3L/09.11.3452"<<endl;
    cout<<"—————————————————-"<<endl;
    cout<<"Program Penghitung Kleen Closure"<<endl;
    cout<<"===================================================="<<endl;
    cout<<"1. Program Kleene Closure 1 Alphabet "<<endl;
    cout<<"2. Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"3. Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"4. Keluar Dari Program"<<endl;
    cout<<endl;
    cout<<"Pilih untuk memulai (1/2/3) atau 4 untuk Keluar"<>n;
    clrscr();
    if (n==1)closure1();
    else if (n==2) closure2();
    else if (n==3) closure3();
    else if (n==4) exit(0);
    else cout<<"ANDA SALAH!!!!"<<endl;
    akhir ('y');
    }
    int akhir(char)
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"Apakah Anda ingin menghitung kembali??? (Y/T)"<>a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

    void closure1(){
    clrscr();
    char x;
    cout<<"Program Kleene Closure 1 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<"}* = "<<"

    {^,"<<x<<","<<x<<x<<","<<x<<x<<x<<","<<x<<x<<x<<x<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');

    }

    void closure2() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^,"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }

    void closure3() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }
    /*int menu(void) {
    int n;
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"———————-"<<endl;
    cout<<"Nama \t\t: Aditya Widiatmoko."<<endl;
    cout<<"Kelas/ NIM\t: S1-TI-3L/09.11.3452"<<endl;
    cout<<"———————————-"<<endl;
    cout<<"\n1. Input 1 Alphabet"<<endl;
    cout<<"2. Input 2 Alphabet"<<endl;
    cout<<"3. Input 3 Alphabet"<<endl;
    cout<<"4. Exit"<<endl;
    cout<>n;
    clrscr();
    return n;
    }
    */
    int akhir()
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"Apakah Anda ingin menghitung kembali??? (Y/T)"<>a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

  14. #include
    #include
    #include

    void utama(void);
    int akhir(char );
    void closure1();
    void closure2();
    void closure3();

    void main()
    {
    utama();
    getch();
    }

    void utama(void)
    {
    int n;
    cout<<"—————————————————-"<<endl;
    cout<<" Nama \t\t: Yudhita Dewi.R."<<endl;
    cout<<" Kelas/ NIM\t: S1-TI-3L/09.11.3399"<<endl;
    cout<<"—————————————————-"<<endl;
    cout<<"Program Penghitung Kleen Closure"<<endl;
    cout<<"===================================================="<<endl;
    cout<<"1. Program Kleene Closure 1 Alphabet "<<endl;
    cout<<"2. Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"3. Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"4. Keluar Dari Program"<<endl;
    cout<<endl;
    cout<<"Pilih untuk memulai (1/2/3) atau 4 untuk Keluar"<>n;
    clrscr();
    if (n==1)closure1();
    else if (n==2) closure2();
    else if (n==3) closure3();
    else if (n==4) exit(0);
    else cout<<"ANDA SALAH!!!!"<<endl;
    akhir ('y');
    }
    int akhir(char)
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"Apakah Anda ingin menghitung kembali??? (Y/T)"<>a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

    void closure1(){
    clrscr();
    char x;
    cout<<"Program Kleene Closure 1 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<"}* = "<<"

    {^,"<<x<<","<<x<<x<<","<<x<<x<<x<<","<<x<<x<<x<<x<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');

    }

    void closure2() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^,"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }

    void closure3() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }
    /*int menu(void) {
    int n;
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"———————-"<<endl;
    cout<<"Nama \t\t: Yudhita Dewi.R."<<endl;
    cout<<"Kelas/ NIM\t: S1-TI-3L/09.11.3399"<<endl;
    cout<<"———————————-"<<endl;
    cout<<"\n1. Input 1 Alphabet"<<endl;
    cout<<"2. Input 2 Alphabet"<<endl;
    cout<<"3. Input 3 Alphabet"<<endl;
    cout<<"4. Exit"<<endl;
    cout<>n;
    clrscr();
    return n;
    }
    */
    int akhir()
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"Apakah Anda ingin menghitung kembali??? (Y/T)"<>a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

  15. //Muzakki Ahmad
    //Nim: 09.11.3413
    //S1 TI -3L

    #include
    #include
    #include
    #include

    void njajal();

    int main()
    {
    njajal();

    }

    void njajal()
    {
    int jmlx, jmly, i, a[10], b[10];

    printf (“Tugas Matematics Distrece\n”);
    printf (“Muzakki Ahmad\n”);
    printf (“============================================\n”);

    printf (“Input Jumlah Unsur Himpunan X (Maksimal 10): “);
    scanf (“%d”,&jmlx);

    for (i=1;i<=jmlx;i++)
    {
    printf ("Input Unsur ke-%d = ", i);
    scanf("%d", &a[i]);
    }
    printf ("============================================\n");
    printf ("Input Jumlah Unsur Himpunan Y (Maksimal 10): ");
    scanf("%d",&jmly);

    for (i=1;i<=jmly;i++)
    {
    printf ("Input Unsur ke-%d = ", i);
    scanf("%d", &b[i]);
    }

    printf("———————————————\n");
    printf("———————————————\n");

    printf("X Irisan Y = ");
    for(i=1;i<=jmly;i++)
    {
    if (a[1]==b[i])
    printf(" %d,",a[1]);
    else
    cout<<"";

    if (a[2]==b[i])
    printf(" %d,",a[2]);
    else
    cout<<"";

    if (a[3]==b[i])
    printf(" %d,",a[3]);
    else
    cout<<"";

    if (a[4]==b[i])
    printf(" %d,",a[4]);
    else
    cout<<"";

    if (a[5]==b[i])
    printf(" %d,",a[5]);
    else
    cout<<"";

    if (a[6]==b[i])
    printf(" %d,",a[6]);
    else
    cout<<"";

    if (a[7]==b[i])
    printf(" %d,",a[7]);
    else
    cout<<"";

    if (a[8]==b[i])
    printf(" %d,",a[8]);
    else
    cout<<"";

    if (a[9]==b[i])
    printf(" %d,",a[9]);
    else
    cout<<"";

    if (a[10]==b[i])
    printf(" %d,",a[10]);
    else
    cout<<"";
    }

    printf ("\nX Gabungan Y = ");
    for(i=1;i<<"Mau coba lagi ga? (1 = ya, 2 = tidak)?: \n"nx;

    if(nx==1)
    njajal();
    else
    exit(0);

    getch();
    }

    /* pengeluaran njajal
    Tugas Matematic Distrece
    Muzakki Ahmad
    ==============================
    Input Jumlah Unsur Himpunan X (Maksimal 10):
    2
    Input Unsur ke-1= {a,b,c}
    Input Unsur ke-2={d,e,f}

    program beljalan tapi g berhenti-henti*/

  16. #include
    #include
    #include

    void utama(void);
    int akhir(char );

    void closure1();
    void closure2();
    void closure3();

    void main()
    {
    utama();
    getch();
    }

    void utama(void)
    {
    int n;
    cout<<"===================================================="<<endl;
    cout<<" Nama \t\t:m.fakhrur.rozi "<<endl;
    cout<<" Kelas/ NIM\t:09.11.3458 "<<endl;
    cout<<"—————————————————-"<<endl;
    cout<<"Kleen Closure PROGRAM"<<endl;
    cout<<"===================================================="<<endl;
    cout<<"1. Kleene Closure 1_Alphabet "<<endl;
    cout<<"2. Kleene Closure 2_Alphabet"<<endl;
    cout<<"3. Kleene Closure 3_Alphabet"<<endl;
    cout<<"4. EXIT"<<endl;
    cout<<endl;
    cout<<"SELECT TO THE START (1/2/3) atau 4 EXIT"<>n;
    clrscr();
    if (n==1)closure1();
    else if (n==2) closure2();
    else if (n==3) closure3();
    else if (n==4) exit(0);
    else cout<<"false!!!"<<endl;
    akhir ('y');
    }
    int akhir(char)
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"do you wanna to try??? (Y/T)"<>a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

    void closure1()
    {
    clrscr();
    char x;
    cout<<"Kleene Closure 1_Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<"}* = "<<" {^,"<<x<<","<<x<<x<<","<<x<<x<<x<<","<<x<<x<<x<<x<<","<<x<<x<<x<<x<<x<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');

    }

    void closure2()
    {
    clrscr();
    char x, y;
    cout<<" Kleene Closure 2_Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^,"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }

    void closure3()
    {
    clrscr();
    char x, y, z;
    cout<<" Kleene Closure 3_Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }

    /*
    int menu(void) {
    int n;
    cout<<"KLEENE CLOSURE PROGRAM"<<endl;
    cout<<"———————-"<<endl;
    cout<<"Nama \t\t: m.fakhrur.rozi"<<endl;
    cout<<"Kelas/ NIM\t: 09.11.3458"<<endl;
    cout<<"———————————-"<<endl;
    cout<<"\n1. Input 1 Alphabet"<<endl;
    cout<<"2. Input 2 Alphabet"<<endl;
    cout<<"3. Input 3 Alphabet"<<endl;
    cout<<"4. Exit"<<endl;
    cout<>n;
    clrscr();
    return n;
    }
    */

    int akhir()
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"do you wanna to try??? (Y/T)"<>a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

  17. #include
    #include
    #include

    void closure1();
    void closure2();
    int menu();

    main() {
    int p;
    p=menu();
    clrscr();
    switch(p) {
    case 1:
    closure1();
    break;
    case 2:
    closure2();
    break;
    case 3:
    exit(0);
    }
    return 0;
    }

    void closure1() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    menu();
    }

    void closure2() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    menu();
    }
    int menu(void) {
    int n;
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"———————-"<<endl;
    cout<<"Nama \t\t: Rendy saputra"<<endl;
    cout<<"Kelas/ NIM\t: S1-TI-3L/ 09.11.3430"<<endl;
    cout<<"———————————-"<<endl;
    cout<<"\n1. Input 2 Alphabet"<<endl;
    cout<<"2. Input 3 Alphabet"<<endl;
    cout<<"3. Exit"<<endl;
    cout<>n;
    clrscr();
    return n;
    }

  18. #include
    #include
    #include
    void utama(void);
    int akhir(char );
    void closure1();
    void closure2();

    void main()
    {
    utama();
    getch();
    }

    void utama(void)
    {
    int n;
    cout<<"—————————————————-"<<endl;
    cout<<" Nama \t\t: Yuniar Eliza"<<endl;
    cout<<" Kelas/ NIM\t: S1TI-3L / 09.11.3461"<<endl;
    cout<<"—————————————————-"<<endl;
    cout<<"Program Penghitung Kleen Closure"<<endl;
    cout<<"===================================================="<<endl;
    cout<<"1. Program Kleene Closure 1 Alphabet "<<endl;
    cout<<"2. Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"3. Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"4. Keluar Dari Program"<<endl;
    cout<<endl;
    cout<<"Pilih untuk memulai (1/2/3) atau 4 untuk Keluar"<>n;
    clrscr();
    if (n==1)closure1();
    else if (n==2) closure2();
    else if (n==3) closure3();
    else if (n==4) exit(0);
    else cout<<"ANDA SALAH!!!!"<<endl;
    akhir ('y');
    }
    int akhir(char)
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"Apakah Anda ingin menghitung kembali??? (Y/T)"<>a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

    void closure1(){
    clrscr();
    char x;
    cout<<"Program Kleene Closure 1 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<"}* = "<<"

    {^,"<<x<<","<<x<<x<<","<<x<<x<<x<<","<<x<<x<<x<<x<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');

    }

    void closure2() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^,"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }

    /*int menu(void) {
    int n;
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"———————-"<<endl;
    cout<<"Nama \t\t: Yuniar Eliza"<<endl;
    cout<<"Kelas/ NIM\t: S1TI-3L / 09.11.3461"<<endl;
    cout<<"———————————-"<<endl;
    cout<<"\n1. Input 1 Alphabet"<<endl;
    cout<<"2. Input 2 Alphabet"<<endl;
    cout<<"3. Input 3 Alphabet"<<endl;
    cout<<"4. Exit"<<endl;
    cout<>n;
    clrscr();
    return n;
    }
    */
    int akhir()
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"Apakah Anda ingin menghitung kembali??? (Y/T)"<>a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

  19. #include
    #include
    #include

    char a[5];
    void program();
    void tanya();

    void main(){
    program();
    getch();
    }

    void program(){
    int i ;
    char x,y;
    cout<<"Nama : Miyarto"<<endl;
    cout<<"NIM : 09.11.3450"<<endl;
    cout<<"Kelas : S1 TI-3L"<<endl;
    cout<<"================================================="<<endl;
    cout<<"Silakan masukan 2 alphabet (huruf/angka)"<<endl;
    cout<<"NB : Batasan hanya sampai dua"<<endl;
    cout<<"================================================="<<endl;//menampilkan batas maksimal klene closure

    for(i=1;i<=2;i++)
    {
    cout<<"Input alphabet ke – "<<i<>a[i];
    }

    cout<<"================================================="<<endl;
    cout<<endl;
    cout<<"Kleene closure { "<<x<<","<<y<<" }* = {"<<x<<","<<y<<","<<x<<""<<x<<","<<y<<""<<y<<","<<x<<""<<y<<","<<y<<""<<x<<"}"<<endl;//menampilkan hasil
    cout<<endl;
    tanya();
    }

    {

    int n;
    cout<<"================================================"<<endl;
    cout<>n;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<"Maaf, pilihan nomor yang anda pilih salah,!"<<endl;
    }
    }

  20. #include
    #include
    #include

    void closure1();
    void closure2();
    int menu();

    main() {
    int p;
    p=menu();
    clrscr();
    switch(p) {
    case 1:
    closure1();
    break;
    case 2:
    closure2();
    break;
    case 3:
    exit(0);
    }
    return 0;
    }

    void closure1() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    menu();
    }

    void closure2() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    menu();
    }
    int menu(void) {
    int n;
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"———————-"<<endl;
    cout<<"Nama \t\t: Bagus setiardi S"<<endl;
    cout<<"Kelas/ NIM\t: S1-TI-3L/ 09.11.3455"<<endl;
    cout<<"———————————-"<<endl;
    cout<<"\n1. Input 2 Alphabet"<<endl;
    cout<<"2. Input 3 Alphabet"<<endl;
    cout<<"3. Exit"<<endl;
    cout<>n;
    clrscr();
    return n;
    }

  21. #include
    #include
    #include

    char a[5];
    void program();
    void tanya();

    void main(){
    program();
    getch();
    }

    void program(){
    int i ;
    char x,y;
    cout<<"Nama : Miyarto"<<endl;
    cout<<"NIM : 09.11.3450"<<endl;
    cout<<"Kelas : S1 TI-3L"<<endl;
    cout<<"================================================="<<endl;
    cout<<"Silakan masukan 2 alphabet (huruf/angka)"<<endl;
    cout<<"NB : Batasan hanya sampai dua"<<endl;
    cout<<"================================================="<<endl;//menampilkan batas maksimal klene closure

    for(i=1;i<=2;i++)
    {
    cout<<"Input alphabet ke – "<<i<>a[i];
    }

    cout<<"================================================="<<endl;
    cout<<endl;
    cout<<"Kleene closure { "<<x<<","<<y<<" }* = {"<<x<<","<<y<<","<<x<<""<<x<<","<<y<<""<<y<<","<<x<<""<<y<<","<<y<<""<<x<<"}"<<endl;//menampilkan hasil
    cout<<endl;
    tanya();
    }

    {

    int n;
    cout<<"================================================"<<endl;
    cout<>n;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<"Maaf, pilihan nomor yang anda pilih salah !"<<endl;
    }
    }

  22. #include
    #include
    #include

    void closure1();
    void closure2();
    int menu();

    main() {
    int p;
    p=menu();
    clrscr();
    switch(p) {
    case 1:
    closure1();
    break;
    case 2:
    closure2();
    break;
    case 3:
    exit(0);
    }
    return 0;
    }

    void closure1() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    menu();
    }

    void closure2() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    menu();
    }
    int menu(void) {
    int n;
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"———————-"<<endl;
    cout<<"Nama \t\t: Sigit aji saputro"<<endl;
    cout<<"Kelas/ NIM\t: S1-TI-3L/ 09.11.3453"<<endl;
    cout<<"———————————-"<<endl;
    cout<<"\n1. Input 2 Alphabet"<<endl;
    cout<<"2. Input 3 Alphabet"<<endl;
    cout<<"3. Exit"<<endl;
    cout<>n;
    clrscr();
    return n;
    }

  23. #include
    #include
    #include

    void closure1();
    void closure2();
    int menu();

    main() {
    int p;
    p=menu();
    clrscr();
    switch(p) {
    case 1:
    closure1();
    break;
    case 2:
    closure2();
    break;
    case 3:
    exit(0);
    }
    return 0;
    }

    void closure1() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    menu();
    }

    void closure2() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    menu();
    }
    int menu(void) {
    int n;
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"———————-"<<endl;
    cout<<"Nama \t\t: Pabriyana"<<endl;
    cout<<"Kelas/ NIM\t: S1-TI-3L/ 09.11.3456"<<endl;
    cout<<"———————————-"<<endl;
    cout<<"\n1. Input 2 Alphabet"<<endl;
    cout<<"2. Input 3 Alphabet"<<endl;
    cout<<"3. Exit"<<endl;
    cout<>n;
    clrscr();
    return n;
    }

  24. #include
    #include
    #include

    void closure1();
    void closure2();
    int menu();

    main() {
    int p;
    p=menu();
    clrscr();
    switch(p) {
    case 1:
    closure1();
    break;
    case 2:
    closure2();
    break;
    case 3:
    exit(0);
    }
    return 0;
    }

    void closure1() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    menu();
    }

    void closure2() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    menu();
    }
    int menu(void) {
    int n;
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"———————-"<<endl;
    cout<<"Nama \t\t: Tri wahyu utomo"<<endl;
    cout<<"Kelas/ NIM\t: S1-TI-3L/ 09.11.3424"<<endl;
    cout<<"———————————-"<<endl;
    cout<<"\n1. Input 2 Alphabet"<<endl;
    cout<<"2. Input 3 Alphabet"<<endl;
    cout<<"3. Exit"<<endl;
    cout<>n;
    clrscr();
    return n;
    }

  25. /*nama : arif sutiawan
    nim : 09.11.3411
    kelas : s1ti 3L*/

    #include
    #include
    #include

    void closure1();
    void closure2();
    int menu();

    main() {
    int p;
    p=menu();
    clrscr();
    switch(p) {
    case 1:
    closure1();
    break;
    case 2:
    closure2();
    break;
    case 3:
    exit(0);
    }
    return 0;
    }

    void closure1() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    menu();
    }

    void closure2() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    menu();
    }
    int menu(void) {
    int n;
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"———————-"<<endl;
    cout<<"Nama \t\t: Arif sutiawan"<<endl;
    cout<<"Kelas/ NIM\t: S1-TI-3L/ 09.11.3411"<<endl;
    cout<<"———————————-"<<endl;
    cout<<"\n1. Input 2 Alphabet"<<endl;
    cout<<"2. Input 3 Alphabet"<<endl;
    cout<<"3. Exit"<<endl;
    cout<>n;
    clrscr();
    return n;
    }

  26. #include
    #include
    #include

    void closure1();
    void closure2();
    int menu();

    main() {
    int p;
    p=menu();
    clrscr();
    switch(p) {
    case 1:
    closure1();
    break;
    case 2:
    closure2();
    break;
    case 3:
    exit(0);
    }
    return 0;
    }

    void closure1() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    menu();
    }

    void closure2() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    menu();
    }
    int menu(void) {
    int n;
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"———————-"<<endl;
    cout<<"Nama \t\t: Arif sutiawan"<<endl;
    cout<<"Kelas/ NIM\t: S1-TI-3L/ 09.11.3411"<<endl;
    cout<<"———————————-"<<endl;
    cout<<"\n1. Input 2 Alphabet"<<endl;
    cout<<"2. Input 3 Alphabet"<<endl;
    cout<<"3. Exit"<<endl;
    cout<>n;
    clrscr();
    return n;
    }

  27. //program ini mengarahkan user untuk memahami Kleene Closure,pada saat kluar perintah untuk memasukkan input maka user disuruh untuk mengetik sebuah input dan saat menekan enter maka akan muncul kleene clouser dari hasil input.contoh A=1 , B=2 maka hasil dari program saya 1,2,11,22,12,21

    #include
    #include
    #include
    #include

    float a[5];
    void program();
    void tanya();

    void main(){
    program();
    getch();
    }

    void program(){
    char a[4];
    char b[4];
    cout<<"* Name : Nurul Amal"<<endl;
    cout<<"* NIM : 09.11.3401"<<endl;
    cout<<"* Class : S1 TI 3L"<<endl;
    cout<<"==="<<endl;
    cout<<"==="<<endl;
    cout<<"Please enter two alphabet (letters or numbers)"<<endl;
    cout<<"NB : Your input only two value"<<endl;
    cout<<"==="<<endl;
    cout<<"==="<<endl;
    cout<<"Enter the value A "<>a;
    cout<<"Enter the value B "<>b;
    cout<<"======="<<endl;
    cout<<"Kleene closure { "<<a<<","<<b<<" }* = {"<<a<<","<<b<<","<<a<<""<<a<<","<<b<<""<<b<<","<<a<<""<<b<<","<<b<<""<<a<<"}"<<endl;

    cout<<"======="<<endl;
    cout<<endl;
    tanya() ;
    }

    void tanya()
    {

    int n;
    cout<<"……………………………………………."<<endl;
    cout<>n;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<"your input wrong,please try again.."<<endl;
    }
    }

  28. #include
    #include
    #include

    void utama(void);
    int akhir(char );
    void closure1();
    void closure2();
    void closure3();

    void main()
    {
    utama();
    getch();
    }

    void utama(void)
    {
    int n;
    cout<<"—————————————————-"<<endl;
    cout<<" Nama \t\t: Bani adam"<<endl;
    cout<<" Kelas/ NIM\t: S1-TI-3L/09.11.3446"<<endl;
    cout<<"—————————————————-"<<endl;
    cout<<"Program Penghitung Kleen Closure"<<endl;
    cout<<"===================================================="<<endl;
    cout<<"1. Program Kleene Closure 1 Alphabet "<<endl;
    cout<<"2. Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"3. Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"4. Keluar Dari Program"<<endl;
    cout<<endl;
    cout<<"Pilih untuk memulai (1/2/3) atau 4 untuk Keluar"<>n;
    clrscr();
    if (n==1)closure1();
    else if (n==2) closure2();
    else if (n==3) closure3();
    else if (n==4) exit(0);
    else cout<<"ANDA SALAH!!!!"<<endl;
    akhir ('y');
    }
    int akhir(char)
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"Apakah Anda ingin menghitung kembali??? (Y/T)"<>a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

    void closure1(){
    clrscr();
    char x;
    cout<<"Program Kleene Closure 1 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<"}* = "<<" {^,"<<x<<","<<x<<x<<","<<x<<x<<x<<","<<x<<x<<x<<x<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');

    }

    void closure2() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^,"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }

    void closure3() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }
    /*int menu(void) {
    int n;
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"———————-"<<endl;
    cout<<"Nama \t\t: Bani adam"<<endl;
    cout<<"Kelas/ NIM\t:S1-TI-3L 09.11.3446"<<endl;
    cout<<"———————————-"<<endl;
    cout<<"\n1. Input 1 Alphabet"<<endl;
    cout<<"2. Input 2 Alphabet"<<endl;
    cout<<"3. Input 3 Alphabet"<<endl;
    cout<<"4. Exit"<<endl;
    cout<>n;
    clrscr();
    return n;
    }
    */
    int akhir()
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"Apakah Anda ingin menghitung kembali??? (Y/T)"<>a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

  29. #include
    #include
    #include
    /*tolong dibedain sedikit ya??*/
    /*termia kasih*/
    void closure1();
    void closure2();
    int menu();

    main() {
    int p;
    p=menu();
    clrscr();
    switch(p) {
    case 1:
    closure1();
    break;
    case 2:
    closure2();
    break;
    case 3:
    exit(0);
    }
    return 0;
    }

    void closure1() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    menu();
    }

    void closure2() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    menu();
    }
    int menu(void) {
    int n;
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"———————-"<<endl;
    cout<<"Nama \t\t: Daru prabowo"<<endl;
    cout<<"Kelas/ NIM\t: S1-TI-3L/ 09.11.3414"<<endl;
    cout<<"———————————-"<<endl;
    cout<<"\n1. Input 2 Alphabet"<<endl;
    cout<<"2. Input 3 Alphabet"<<endl;
    cout<<"3. Exit"<<endl;
    cout<>n;
    clrscr();
    return n;
    }

  30. #include
    #include
    #include

    void utama(void);
    int akhir(char );
    void closure1();
    void closure2();
    void closure3();

    void main()
    {
    utama();
    getch();
    }

    void utama(void)
    {
    int n;
    cout<<"—————————————————-"<<endl;
    cout<<" Nama \t\t: Bani adam"<<endl;
    cout<<" Kelas/ NIM\t: S1-TI-3L/09.11.3446"<<endl;
    cout<<"—————————————————-"<<endl;
    cout<<"Program Penghitung Kleen Closure"<<endl;
    cout<<"===================================================="<<endl;
    cout<<"1. Program Kleene Closure 1 Alphabet "<<endl;
    cout<<"2. Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"3. Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"4. Keluar Dari Program"<<endl;
    cout<<endl;
    cout<<"Pilih untuk memulai (1/2/3) atau 4 untuk Keluar"<>n;
    clrscr();
    if (n==1)closure1();
    else if (n==2) closure2();
    else if (n==3) closure3();
    else if (n==4) exit(0);
    else cout<<"ANDA SALAH!!!!"<<endl;
    akhir ('y');
    }
    int akhir(char)
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"Apakah Anda ingin menghitung kembali??? (Y/T)"<>a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

    void closure1(){
    clrscr();
    char x;
    cout<<"Program Kleene Closure 1 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<"}* = "<<" {^,"<<x<<","<<x<<x<<","<<x<<x<<x<<","<<x<<x<<x<<x<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');

    }

    void closure2() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^,"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }

    void closure3() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }
    /*int menu(void) {
    int n;
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"———————-"<<endl;
    cout<<"Nama \t\t: Bani adam"<<endl;
    cout<<"Kelas/ NIM\t: 09.11.3446"<<endl;
    cout<<"———————————-"<<endl;
    cout<<"\n1. Input 1 Alphabet"<<endl;
    cout<<"2. Input 2 Alphabet"<<endl;
    cout<<"3. Input 3 Alphabet"<<endl;
    cout<<"4. Exit"<<endl;
    cout<>n;
    clrscr();
    return n;
    }
    */
    int akhir()
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"Apakah Anda ingin menghitung kembali??? (Y/T)"<>a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

  31. // PROGRAMNYA

    #include
    #include
    #include
    #include

    float a[5];
    void program();
    void tanya();

    void main(){
    program();
    getch();
    }

    void program(){
    char a[4];
    char b[4];
    cout<<"Nama : JULHELMAN"<<endl;
    cout<<"NIM : 09.11.3393"<<endl;
    cout<<"Kelas : S1 TI 3L"<<endl;
    cout<<"*******************************************************"<<endl;
    cout<<"Silakan masukan 2 alphabet (huruf/angka)"<<endl;
    cout<<"NB : Maksimal 3 karakter"<<endl;
    cout<<"——————————————————-"<<endl;
    cout<<"Silahkan masukkan nilai a "<>a;
    cout<<"Silahkan masukkan nilai b "<>b;
    cout<<"========================================"<<endl;
    cout<<"Kleene closure { "<<a<<","<<b<<" }* = {"<<a<<","<<b<<","<<a<<""<<a<<","<<b<<""<<b<<","<<a<<""<<b<<","<<b<<""<<a<<"}"<<endl;

    cout<<"========================================"<<endl;
    cout<<endl;
    tanya();
    }

    void tanya()
    {

    int n;
    cout<<"******************************************"<<endl;
    cout<>n;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<"BUZZ! Pilih yang bener!"<<endl;
    }
    }

    //HASILNYA

    Nama :Julhelman
    NIM :09.11.3393
    Kelas : S1.TI.3L
    *******************************************************
    Silahkan masukkan 2 alphabet (huruf/angka)
    NB : Maksimal 2 karakter
    ——————————————————————–
    Silahkan masukkan nilai a = ss (misalnya)
    Silahkan masukkan niali b = ww(misalnya)
    =======================================
    Kleene closure {ss,ww}* = {ss,ww,ssss,wwww,ssww,wwss }
    =======================================

    ******************************************************
    Try again? [ pilih 1 = yes ; pilih 2 = no ] =

    //penjelasan dan cara kerja dari hasil di atas ialah:
    pada nilai a,kita di minta untuk memasukkan nilai atau huruf pada a tersebut.misal nya masukkan nya ss,
    kemudian masukkan nilai b dengan kita memasukkan huruf ww,
    maka cleene closure nya akan keluar menjadi ss,ww,sss,www,ssww,wwss.

  32. #include
    #include
    #include

    char a[5];
    void program();
    void konfirmasi();

    void main(){
    program();
    getch();
    }

    void program(){
    int i ;
    char x,y;
    cout<<"Nama : Syahrizal Widiarto"<<endl;
    cout<<"NIM : 09.11.3457"<<endl;
    cout<<"Kelas : S1 TI 3L"<<endl;
    cout<<"——————————————————-"<<endl;
    cout<<"Silakan masukan 2 karakter"<<endl;
    cout<<"NB : Batasan cuma sampai dua"<<endl;
    cout<<"——————————————————-"<<endl;

    for(i=1;i<=2;i++)
    {
    cout<<"Input karakter ke – "<<i<>a[i];
    }

    cout<<"——————————————————-"<<endl;
    cout<<endl;
    cout<<"Kleene closure { "<<x<<","<<y<<" }* = {"<<x<<","<<y<<","<<x<<""<<x<<","<<y<<""<<y<<","<<x<<""<<y<<","<<y<<""<<x<<"}"<<endl;
    cout<<endl;
    konfirmasi();
    }

    void konfirmasi()
    {

    int n;
    cout<<"——————————————————-"<<endl;
    cout<>n;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<"pilihan tidak ditemukan, try again"<<endl;
    }
    }

  33. NAMA : ANNAS IMAM SAFII
    KELAS : S1 TI 3L
    NIM : 09.11.3426

    #include
    #include
    #include
    char a[5];
    void program();
    void cobalagi();
    void main(){
    program();
    getch();
    }
    void program(){
    /*Tampilan Program */
    cout<<"____________________________
    __________________________"<<endl;
    cout<<"\t PROGRAM KLEENE
    CLOSURE"<<endl;
    cout<<"\tOleh: Annas Imam Safi’i
    Danisworo"<<endl;
    cout<<"\t\t09.11.3426"<<endl;
    cout<<"____________________________
    __________________________"<<endl;
    cout<<"======================================================"<<endl;
    cout<<"\tSilakan inputkan 2
    huruf/angka"<<endl;
    cout<<"NB : Batasan cuma
    sampai 2 (dua) karakter saja.
    ^^"<<endl;
    cout<<"======================================================"<<endl;
    /*Rumus dan Program Kleene
    Closure*/
    char x, y;
    cout<>x;
    cout<>y;
    cout<<"———————————-
    ="<<endl;
    cout<<"Kleene Closure
    { "<<x<<","<<y<<" }* =
    "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }
    "<<endl;
    cout<<endl;
    cobalagi();
    }
    /*Pilihan untuk mengakhiri
    program atau mengulang
    kembali*/
    void cobalagi()
    {
    int n;
    cout<<"==++==++==++==++==+
    +==++==++==++==++==++==+
    +==++==++=="<<endl;
    cout<>n;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<"Maaf,, input hanya
    terbatas 1-2 karakter saja,,
    silahkan mencoba kembali.
    ^^"<<endl;
    getch();
    cobalagi();
    }
    }

  34. #include
    #include
    #include

    char a[8];
    void program();
    void konfirmasi();

    void main(){
    program();
    getch();
    }

    void program(){
    int i ;
    char x,y,z;
    cout<<"Nama : Dhimas Agil Sutoto"<<endl;
    cout<<"NIM : 09.11.3428"<<endl;
    cout<<"Kelas : S1 TI 3L"<<endl;
    cout<<"——————————————————-"<<endl;
    cout<<"————-peraturan—————–<<endl;
    cout<<"1. silahkan masukan karakter<<endl;
    cout<<"2. karakter tidak boleh lebih dari 3"<<endl;
    cout<<"nb : mohon ikuti dengan baik aturan diatas"<<endl;
    cout<<"warning anda melebihi kapasitas mohon ikuti peraturan
    "<<endl;
    cout<<"——————————————————-"<<endl;

    for(i=1;i<=2;i++)
    {
    cout<<"Input karakter ke – "<<i<>a[i];
    }

    cout<<"——————————————————-"<<endl;
    cout<<endl;
    cout<<"Kleene closure { "<<x<<","<<y<<", "<<z<<"}* = {"<<x<<","<<y<<","<<z<<","<<x<<""<<x<<","<<y<<""<<y<<","<<z<<""<<z<<","<<x<<""<<y<<""<<z<<","<<z<<""<<y<<""<<x<<"}"<<endl;
    cout<<endl;
    konfirmasi();
    }

    void konfirmasi()
    {

    int n;
    cout<<"——————————————————-"<<endl;
    cout<>n;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<"sorry jack pilihan anda tidak ditemukan, harap ulang keembali"<<endl;
    }
    }

  35. #include
    #include
    #include

    char a[5];
    void program();
    void konfirmasi();

    void main(){
    program();
    getch();
    }

    void program(){
    int i ;
    char x,y,z;
    cout<<"Nama : Dhimas Agil Sutoto"<<endl;
    cout<<"NIM : 09.11.34528"<<endl;
    cout<<"Kelas : S1 TI 3L"<<endl;
    cout<<"——————————————————-"<<endl;
    cout<<"————-peraturan—————–<<endl;
    cout<<"1. silahkan masukan karakter<<endl;
    cout<<"2. karakter tidak boleh lebih dari 3"<<endl;
    cout<<"nb : mohon ikuti dengan baik aturan diatas"<<endl;
    cout<<"warning anda melebihi kapasitas mohon ikuti peraturan
    "<<endl;
    cout<<"——————————————————-"<<endl;

    for(i=1;i<=2;i++)
    {
    cout<<"Input karakter ke – "<<i<>a[i];
    }

    cout<<"——————————————————-"<<endl;
    cout<<endl;
    cout<<"Kleene closure { "<<x<<","<<y<<", "<<z<<"}* = {"<<x<<","<<y<<","<<z<<","<<x<<""<<x<<","<<y<<""<<y<<","<<z<<""<<z<<","<<x<<""<<y<<""<<z<<","<<z<<""<<y<<""<<x<<"}"<<endl;
    cout<<endl;
    konfirmasi();
    }

    void konfirmasi()
    {

    int n;
    cout<<"——————————————————-"<<endl;
    cout<>n;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<"sorry jack pilihan anda tidak ditemukan, harap ulang keembali"<<endl;
    }
    }

  36. import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.util.logging.Level;
    import java.util.logging.Logger;

    /**Nama: suryadi sulaksono
    * Nim : 09.11.3396/TI-3L
    * @author last-six
    */
    public class Main {

    public static void main(String[] args) {
    String input[]=new String[2];
    String hasil[]=new String[1];
    String hasil1[]=new String[1];
    BufferedReader re;
    re = new BufferedReader(new InputStreamReader(System.in));
    System.out.println(“Silahkan Inputkan Angka atau huruf”);
    System.out.println(“NOTE !!\nInputan maksimal 2.”);
    for(int i =0;i<2;i++){
    System.out.print("Input ke – "+(i+1)+" : ");
    try {
    input[i] = re.readLine();
    } catch (IOException ex) {
    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
    }
    }System.out.println("===========Kleene Clousure========\n");
    for(int i=0;i<2;i++){
    System.out.print(input[i]+",");
    }System.out.println("");
    for(int i=0;i<hasil.length;i++){
    for(int j=0;j<2;j++){
    for(int k=0;k<2;k++){
    hasil[i]=input[j]+input[k];
    System.out.print(hasil[i]+",");}
    }
    }
    }
    }
    /*Output : Mislakan Inputan a,b
    * a,b,
    * aa,ab,ba,bb,
    */

  37. #include
    #include
    #include
    char a[5];
    void program();
    void cobalagi();
    void main(){
    program();
    getch();
    }
    void program(){
    /*Tampilan Program */
    cout<<"____________________________
    __________________________"<<endl;
    cout<<"\t PROGRAM KLEENE
    CLOSURE"<<endl;
    cout<<"\tOleh: Elyana Diah Purnamasari
    Danisworo"<<endl;
    cout<<"\t\t09.11.3420"<<endl;
    cout<<"____________________________
    __________________________"<<endl;
    cout<<"======================================================"<<endl;
    cout<<"\tSilakan inputkan 2
    huruf/angka"<<endl;
    cout<<"NB : Batasan cuma
    sampai 2 (dua) karakter saja.
    ^^"<<endl;
    cout<<"======================================================"<<endl;
    /*Rumus dan Program Kleene
    Closure*/
    char x, y;
    cout<>x;
    cout<>y;
    cout<<"———————————-
    ="<<endl;
    cout<<"Kleene Closure
    { "<<x<<","<<y<<" }* =
    "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }
    "<<endl;
    cout<<endl;
    cobalagi();
    }
    /*Pilihan untuk mengakhiri
    program atau mengulang
    kembali*/
    void cobalagi()
    {
    int n;
    cout<<"==++==++==++==++==+
    +==++==++==++==++==++==+
    +==++==++=="<<endl;
    cout<>n;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<"Maaf,, input hanya
    terbatas 1-2 karakter saja,,
    silahkan mencoba kembali.
    ^^"<<endl;
    getch();
    cobalagi();
    }
    }

  38. #include
    #include
    #include
    /*tolong dibedain sedikit ya??*/
    /*termia kasih*/
    void utama(void);
    int akhir(char );
    void closure1();
    void closure2();
    void closure3();

    void main()
    {
    utama();
    getch();
    }

    void utama(void)
    {
    int n;
    cout<<"—————————————————-"<<endl;
    cout<<" Nama \t\t: wahyu sulistya darmawan"<<endl;
    cout<<" Kelas/ NIM\t: S1TI-3L / 09.11.3434"<<endl;
    cout<<"—————————————————-"<<endl;
    cout<<"Program Penghitung Kleen Closure"<<endl;
    cout<<"===================================================="<<endl;
    cout<<"1. Program Kleene Closure 1 Alphabet "<<endl;
    cout<<"2. Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"3. Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"4. Keluar Dari Program"<<endl;
    cout<<endl;
    cout<<"Pilih untuk memulai (1/2/3) atau 4 untuk Keluar"<>n;
    clrscr();
    if (n==1)closure1();
    else if (n==2) closure2();
    else if (n==3) closure3();
    else if (n==4) exit(0);
    else cout<<"ANDA SALAH!!!!"<<endl;
    akhir ('y');
    }
    int akhir(char)
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"Apakah Anda ingin menghitung kembali??? (Y/T)"<>a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

    void closure1(){
    clrscr();
    char x;
    cout<<"Program Kleene Closure 1 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<"}* = "<<" {^,"<<x<<","<<x<<x<<","<<x<<x<<x<<","<<x<<x<<x<<x<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');

    }

    void closure2() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^,"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }

    void closure3() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }
    /*int menu(void) {
    int n;
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"———————-"<<endl;
    cout<<"Nama \t\t: Bolangers Joz"<<endl;
    cout<<"Kelas/ NIM\t: Mblayang"<<endl;
    cout<<"———————————-"<<endl;
    cout<<"\n1. Input 1 Alphabet"<<endl;
    cout<<"2. Input 2 Alphabet"<<endl;
    cout<<"3. Input 3 Alphabet"<<endl;
    cout<<"4. Exit"<<endl;
    cout<>n;
    clrscr();
    return n;
    }
    */
    int akhir()
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"Apakah Anda ingin menghitung kembali??? (Y/T)"<>a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

  39. #include
    #include
    #include

    void utama(void);
    int akhir(char );
    void closure1();
    void closure2();
    void closure3();

    void main()
    {
    utama();
    getch();
    }

    void utama(void)
    {
    int n;
    cout<<"—————————————————-"<<endl;
    cout<<" Nama \t\t: Salis Bagus"<<endl;
    cout<<" Kelas/ NIM\t: 09.11.3437"<<endl;
    cout<<"—————————————————-"<<endl;
    cout<<"Program Penghitung Kleen Closure"<<endl;
    cout<<"===================================================="<<endl;
    cout<<"1. Program Kleene Closure 1 Alphabet "<<endl;
    cout<<"2. Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"3. Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"4. Keluar Dari Program"<<endl;
    cout<<endl;
    cout<<"Pilih untuk memulai (1/2/3) atau 4 untuk exit"<>n;
    clrscr();
    if (n==1)closure1();
    else if (n==2) closure2();
    else if (n==3) closure3();
    else if (n==4) exit(0);
    else cout<<"Salah Salah nah lo"<<endl;
    akhir ('y');
    }
    int akhir(char)
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"Apakah Anda ingin menghitung kembali??? (Y/T)"<>a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

    void closure1(){
    clrscr();
    char x;
    cout<<"Program Kleene Closure 1 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<"}* = "<<"

    {^,"<<x<<","<<x<<x<<","<<x<<x<<x<<","<<x<<x<<x<<x<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');

    }

    void closure2() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^,"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }

    void closure3() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }
    /*int menu(void) {
    int n;
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"———————-"<<endl;
    cout<<"Nama \t\t: Salis Bagus"<<endl;
    cout<<"Kelas/ NIM\t: 09.11.3437"<<endl;
    cout<<"———————————-"<<endl;
    cout<<"\n1. Input 1 Alphabet"<<endl;
    cout<<"2. Input 2 Alphabet"<<endl;
    cout<<"3. Input 3 Alphabet"<<endl;
    cout<<"4. Exit"<<endl;
    cout<>n;
    clrscr();
    return n;
    }
    */
    int akhir()
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"Apakah Anda ingin menghitung kembali??? (Y/T)"<>a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

  40. #include
    #include
    #include

    char a[5];
    void program();
    void tanya();

    void main(){
    program();
    getch();
    }

    void program(){
    int i ;
    char x,y;
    cout<<"Nama : Ekashuva Prabu Wicaksana"<<endl;
    cout<<"NIM : 09.11.3429"<<endl;
    cout<<"Kelas : S1 TI 3L"<<endl;
    cout<<"——————————————————-"<<endl;
    cout<<"Silakan masukan 2 alphabet (huruf/angka)"<<endl;
    cout<<"NB : Batasan cuma sampai dua"<<endl;
    cout<<"——————————————————-"<<endl;

    for(i=1;i<=2;i++)
    {
    cout<<"Input alphabet ke – "<<i<>a[i];
    }

    cout<<"——————————————————-"<<endl;
    cout<<endl;
    cout<<"Kleene closure { "<<x<<","<<y<<" }* = {"<<x<<","<<y<<","<<x<<""<<x<<","<<y<<""<<y<<","<<x<<""<<y<<","<<y<<""<<x<<"}"<<endl;
    cout<<endl;
    tanya();
    }

    void tanya()
    {

    int n;
    cout<<"——————————————————-"<<endl;
    cout<>n;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<"Koplak! Pilih yang bener boss!"<<endl;
    }
    }

  41. #include
    #include
    #include
    #include

    int main();
    void tanya();
    void program();
    void program2();
    int m;
    int main(void)
    {
    int ();
    do {
    system(“cls”);
    printf(“PROGRAM KLEENE CLOUSURE\n\n”);
    printf(“Nama : surya adi prasenta\n”);
    printf(“NIM : 09.11.3444\n”);
    printf(“Kelas : S1TI -3L\n”);
    printf(“========================================\n\n”);
    printf(“CATATAN = HANYA CUKUP UNTUK 4 ALPHABET\n”);
    printf(“MENU PROGRAM\n\n”);

    printf(“1. KLEENE CLOUSUR\n”);
    printf(“2. exit\n”);
    printf(“pilih =”);
    scanf(“%d”, &m);
    switch (m){
    case 1:
    program();
    break;
    case 2:
    break; }
    clrscr();
    }while(m !=2);
    printf (“\n\n\t\tMatur Tank qiu !”);

    getch();
    return 0;
    }

    void program(){
    clrscr();
    char a[4] ;
    char b[4];

    cout<<"masukkan nilai a "a;
    cout<<"masukkan nilai b "b;
    cout<<"========================================"<<endl;
    cout<<"Kleene closure { "<<a<<","<<b<<" }* = {"<<a<<","<<b<<","<<a<<""<<a<<","<<b<<""<<b<<","<<a<<""<<b<<","<<b<<""<<a<<"}"<<endl;
    cout<<"========================================"<<endl;
    cout<<endl;

    int n;
    cout<<"======================================================="<<endl;
    coutn;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    break;
    }
    getch();

    }

    “”ALUR PROGRAM””

    pertama muncul pengenalan program, yang didalamnya terdapat nama, NIM, dan kelas saya
    dibawahnya juga terdpat menu program di mana ada dua menu yaitu yang pertama menu program KLEENE CLOUSURE yang didalamnya menampilkan :

    //CONTOH 1

    masukkan nilai a = aa
    masukkan nilai b=bb
    ========================================
    Kleene Clousure * =
    ========================================
    tekan
    1. untuk lanjut
    2. untuk kembali
    ========================================

    //CONTOH 2

    masukkan nilai a = a
    masukkan nilai b=bb
    ================================
    Kleene Clousure * =
    ========================================
    tekan
    1. untuk lanjut
    2. untuk kembali
    ========================================

    dan kedua terdapat menu exit dimana jika kita memilih tersebut, maka program akan keluar.

    NB : displaynya ndak bisa di kirim lewat post comment kan pak jadi saya kirim lewat email juga ya pak

  42. #include
    #include
    #include

    void utama(void);
    int akhir(char );
    void closure1();
    void closure2();
    void closure3();

    void main()
    {
    utama();
    getch();
    }

    void utama(void)
    {
    int n;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<" Nama \t\t: Mei Retno Asih"<<endl;
    cout<<" Kelas/ NIM\t: S1-TI-3L/09.11.3423"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"Program Menghitung Kleen Closure"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"1. Program Kleene Closure 1 Alphabet"<<endl;
    cout<<"2. Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"3. Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"4. Keluar Dari Program"<<endl;
    cout<<endl;
    cout<<"Pilihlah untuk memulai (1/2/3) dan 4 untuk Keluar"n;
    clrscr();
    if (n==1)closure1();
    else if (n==2) closure2();
    else if (n==3) closure3();
    else if (n==4) exit(0);
    else cout<<"Maaf silahkan masukan Yang Benar!!!!"<<endl;
    akhir ('y');
    }
    int akhir(char)
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"Apakah Anda ingin menghitung kembali??? (Y/T)"a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

    void closure1(){
    clrscr();
    char x;
    cout<<"Program Kleene Closure 1 Alphabet"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;

    coutx;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"Kleene Closure { "<<x<<"}* = "<<" {^,"<<x<<","<<x<<x<<","<<x<<x<<x<<","<<x<<x<<x<<x<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');

    }

    void closure2() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;

    coutx;
    couty;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^,"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }

    void closure3() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;

    coutx;
    couty;
    coutz;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }
    int akhir()
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"Apakah Anda ingin menghitung kembali??? (Y/T)"a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

    “HASIL”
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Nama : Mei Retno Asih
    Kelas/ NIM : S1-TI-3L/09.11.3423
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Program Menghitung Kleen Closure
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1. Program Kleene Closure 1 Alphabet
    2. Program Kleene Closure 2 Alphabet
    3. Program Kleene Closure 3 Alphabet
    4. Keluar Dari Program

    Pilihlah untuk memulai (1/2/3) dan 4 untuk Keluar
    ****************************************************
    ****************************************************
    Program Kleene Closure 3 Alphabet
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Masukkan Alphabet ke-1 : 1
    Masukkan Alphabet ke-2 : a
    Masukkan Alphabet ke-3 : t
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Kleene Closure { 1a,t }*= {^,1a,t,1a1a,1at,t1a,tt,1a1a1a,1at1a, …. }

    ====================================================
    Apakah Anda ingin menghitung kembali??? (Y/T)

  43. #include
    #include
    #include
    #include

    int main();
    void tanya();
    void program();
    void program2();
    int m;
    int main(void)
    {
    int ();
    do {
    system(“cls”);
    printf(“PROGRAM KLEENE CLOUSURE\n\n”);
    printf(“Nama : surya adi prasenta\n”);
    printf(“NIM : 09.11.3444\n”);
    printf(“Kelas : S1TI -3L\n”);
    printf(“========================================\n\n”);
    printf(“CATATAN = HANYA CUKUP UNTUK 4 ALPHABET\n”);
    printf(“MENU PROGRAM\n\n”);

    printf(“1. KLEENE CLOUSUR\n”);
    printf(“2. exit\n”);
    printf(“pilih =”);
    scanf(“%d”, &m);
    switch (m){
    case 1:
    program();
    break;
    case 2:
    break; }
    clrscr();
    }while(m !=2);
    printf (“\n\n\t\tMatur Tank qiu !”);

    getch();
    return 0;
    }

    void program(){
    clrscr();
    char a[4] ;
    char b[4];

    cout<<"masukkan nilai a "<>a;
    cout<<"masukkan nilai b "<>b;
    cout<<"========================================"<<endl;
    cout<<"Kleene closure { "<<a<<","<<b<<" }* = {"<<a<<","<<b<<","<<a<<""<<a<<","<<b<<""<<b<<","<<a<<""<<b<<","<<b<<""<<a<<"}"<<endl;
    cout<<"========================================"<<endl;
    cout<<endl;

    int n;
    cout<<"======================================================="<<endl;
    cout<>n;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    break;
    }
    getch();

    }

    “”ALUR PROGRAM””

    pertama muncul pengenalan program, yang didalamnya terdapat nama, NIM, dan kelas saya
    dibawahnya juga terdpat menu program di mana ada dua menu yaitu yang pertama menu program KLEENE CLOUSURE yang didalamnya menampilkan :

    //CONTOH 1

    masukkan nilai a = aa
    masukkan nilai b=bb
    ========================================
    Kleene Clousure * =
    ========================================
    tekan
    1. untuk lanjut
    2. untuk kembali
    ========================================

    //CONTOH 2

    masukkan nilai a = a
    masukkan nilai b=bb
    ================================
    Kleene Clousure * =
    ========================================
    tekan
    1. untuk lanjut
    2. untuk kembali
    ========================================

    dan kedua terdapat menu exit dimana jika kita memilih tersebut, maka program akan keluar.

    NB : displaynya ndak bisa di kirim lewat post comment kan pak jadi saya kirim lewat email juga ya pak

  44. #include
    #include
    #include

    void closure1();
    void closure2();
    int menu();

    main() {
    int p;
    p=menu();
    clrscr();
    switch(p) {
    case 1:
    closure1();
    break;
    case 2:
    closure2();
    break;
    case 3:
    exit(0);
    }
    return 0;
    }

    void closure1() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    menu();
    }

    void closure2() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    menu();
    }
    int menu(void) {
    int n;
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"———————-"<<endl;
    cout<<"Nama \t\t: Arif Rahman"<<endl;
    cout<<"Kelas/ NIM\t: S1 TI_3L/ 09.11.3447"<<endl;
    cout<<"———————————-"<<endl;
    cout<<"\n1. Input 2 Alphabet"<<endl;
    cout<<"2. Input 3 Alphabet"<<endl;
    cout<<"3. Exit"<<endl;
    cout<>n;
    clrscr();
    return n;
    }

    == Adapun hasil dan alur dari program yang saya buat (penjelasan) :
    Saat Run di Box c:\ kita disuruh untuk mamsukkan salah satu pilihan, misalnya no. 1 yaitu masukkan 2 alphabet (yang kita pilih), misalnya alphabetnya kita inputkan 12 (enter), maka akan muncul Kleene Closure dengan hasil : {1,2}* = {^ 1, 2, 11, 12, 21, 22, 111, 121, 122, 211, …}

    Maka itulah hasil dari prgram (contoh) Kleene Closure yang saya buat dengan menggunakan bahasa c++.

  45. #include
    #include
    #include

    char [5];
    void program();
    void konfirmasi();

    void main(){
    program();
    getch();
    }

    void program(){
    int i ;
    char x,y;
    cout<<"Nama : Syahrizal Widiarto"<<endl;
    cout<<"NIM : 09.11.3457"<<endl;
    cout<<"Kelas : S1 TI 3L"<<endl;
    cout<<"——————————————————-"<<endl;
    cout<<"Silakan masukan 2 karakter"<<endl;
    cout<<"NB : Batasan cuma sampai dua"<<endl;
    cout<<"——————————————————-"<<endl;

    for(i=1;i<=2;i++)
    {
    cout<<"Input karakter ke – "<<i<>a[i];
    }

    cout<<"——————————————————-"<<endl;
    cout<<endl;
    cout<<"Kleene closure { "<<x<<","<<y<<" }* = {"<<x<<","<<y<<","<<x<<""<<x<<","<<y<<""<<y<<","<<x<<""<<y<<","<<y<<""<<x<<"}"<<endl;
    cout<<endl;
    konfirmasi();
    }

    void konfirmasi()
    {

    int n;
    cout<<"——————————————————-"<<endl;
    cout<>n;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<"pilihan tidak ditemukan, try again"<<endl;
    }
    }

  46. #include
    #include
    #include

    void utama(void);
    int akhir(char );
    void closure1();
    void closure2();
    void closure3();

    void main()
    {
    utama();
    getch();
    }

    void utama(void)
    {
    int n;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<" Nama \t\t: Muh. Fathu Rozaq"<<endl;
    cout<<" Kelas/ NIM\t: S1-TI-3L/09.11.3389"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"Program Menghitung Kleen Closure"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"1. Program Kleene Closure 1 Alphabet"<<endl;
    cout<<"2. Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"3. Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"4. Keluar Dari Program"<<endl;
    cout<<endl;
    cout<<"Pilihlah untuk memulai (1/2/3 dan 4 untuk Keluar)"<>n;
    clrscr();
    if (n==1)closure1();
    else if (n==2) closure2();
    else if (n==3) closure3();
    else if (n==4) exit(0);
    else cout<<"Maaf masukan salah, Silahkan masukan Yang Benar!!!!"<<endl;
    akhir ('y');
    }
    int akhir(char)
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"Apakah Anda ingin menghitung kembali??? (Y/T)"<>a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

    void closure1(){
    clrscr();
    char x;
    cout<<"Program Kleene Closure 1 Alphabet"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;

    cout<>x;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"Kleene Closure { "<<x<<"}* = "<<" {^,"<<x<<","<<x<<x<<","<<x<<x<<x<<","<<x<<x<<x<<x<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');

    }

    void closure2() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;

    cout<>x;
    cout<>y;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^,"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }

    void closure3() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }

    int akhir()
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"Apakah Anda ingin menghitung kembali??? (Y/T)"<>a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

    hasilnya…
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Nama : Muh. Fathu Rozaq
    Kelas/ NIM : S1-TI-3L/09.11.3389
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Program Menghitung Kleen Closure
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1. Program Kleene Closure 1 Alphabet
    2. Program Kleene Closure 2 Alphabet
    3. Program Kleene Closure 3 Alphabet
    4. Keluar Dari Program

    Pilihlah untuk memulai (1/2/3 dan 4 untuk Keluar)

    Program Kleene Closure 1 Alphabet
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Masukkan Alphabet : 1
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Kleene Closure { 1}* = {^,1,11,111,1111,…. }

    ====================================================
    Apakah Anda ingin menghitung kembali??? (Y/T)

    Program Kleene Closure 2 Alphabet
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Masukkan Alphabet ke-1 : 1
    Masukkan Alphabet ke-2 : 2
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Kleene Closure { 1,2 }* = {^,1,2,11,12,21,22,111,121,122,212,…. }

    ====================================================
    Apakah Anda ingin menghitung kembali??? (Y/T)

    Program Kleene Closure 3 Alphabet
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Masukkan Alphabet ke-1 : 1
    Masukkan Alphabet ke-2 : 2
    Masukkan Alphabet ke-3 : 3
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Kleene Closure { 12,3 }*= {^,12,3,1212,123,312,33,121212,12312, …. }

    ====================================================
    Apakah Anda ingin menghitung kembali??? (Y/T)

  47. #include
    #include
    #include

    void utama(void);
    int akhir(char );
    void closure1();
    void closure2();
    void closure3();

    void main()
    {
    utama();
    getch();
    }

    void utama(void)
    {
    int n;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<" Nama \t\t: Pinto Wisnu Anggoro"<<endl;
    cout<<" Kelas/ NIM\t: S1-TI-3L/09.11.3454"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"Program Menghitung Kleen Closure"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"1. Program Kleene Closure 1 Alphabet"<<endl;
    cout<<"2. Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"3. Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"4. Keluar Dari Program"<<endl;
    cout<<endl;
    cout<<"Pilihlah untuk memulai (1/2/3) dan 4 untuk Keluar"<>n;
    clrscr();
    if (n==1)closure1();
    else if (n==2) closure2();
    else if (n==3) closure3();
    else if (n==4) exit(0);
    else cout<<"Maaf silahkan masukan Yang Benar!!!!"<<endl;
    akhir ('y');
    }
    int akhir(char)
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"Apakah Anda ingin menghitung kembali??? (Y/T)"<>a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

    void closure1(){
    clrscr();
    char x;
    cout<<"Program Kleene Closure 1 Alphabet"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;

    cout<>x;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"Kleene Closure { "<<x<<"}* = "<<" {^,"<<x<<","<<x<<x<<","<<x<<x<<x<<","<<x<<x<<x<<x<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');

    }

    void closure2() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;

    cout<>x;
    cout<>y;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^,"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }

    void closure3() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }
    int akhir()
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"Apakah Anda ingin menghitung kembali??? (Y/T)"<>a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

    “niki hasile pak”
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Nama : Pinto WisnuAnggoro
    Kelas/ NIM : S1-TI-3L/09.11.3454
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Program Menghitung Kleen Closure
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1. Program Kleene Closure 1 Alphabet
    2. Program Kleene Closure 2 Alphabet
    3. Program Kleene Closure 3 Alphabet
    4. Keluar Dari Program

    Pilihlah untuk memulai (1/2/3) dan 4 untuk Keluar
    ****************************************************
    ****************************************************
    Program Kleene Closure 3 Alphabet
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Masukkan Alphabet ke-1 : 1
    Masukkan Alphabet ke-2 : a
    Masukkan Alphabet ke-3 : t
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Kleene Closure { 1a,t }*= {^,1a,t,1a1a,1at,t1a,tt,1a1a1a,1at1a, …. }

    ====================================================
    Apakah Anda ingin menghitung kembali??? (Y/T)

  48. #include
    #include
    #include

    void utama(void);
    int akhir(char );
    void closure1();
    void closure2();
    void closure3();

    void main()
    {
    utama();
    getch();
    }

    void utama(void)
    {
    int n;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<" Nama \t\t: Anggit Puguh Setyawan"<<endl;
    cout<<" Kelas/ NIM\t: S1-TI-3L/09.11.3442"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"Program Menghitung Kleen Closure"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"1. Program Kleene Closure 1 Alphabet"<<endl;
    cout<<"2. Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"3. Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"4. Keluar Dari Program"<<endl;
    cout<<endl;
    cout<<"Pilihlah untuk memulai (1/2/3 dan 4 untuk Keluar)"<>n;
    clrscr();
    if (n==1)closure1();
    else if (n==2) closure2();
    else if (n==3) closure3();
    else if (n==4) exit(0);
    else cout<<"Maaf masukan salah, Silahkan masukan Yang Benar!!!!"<<endl;
    akhir ('y');
    }
    int akhir(char)
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"Apakah Anda ingin menghitung kembali??? (Y/T)"<>a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

    void closure1(){
    clrscr();
    char x;
    cout<<"Program Kleene Closure 1 Alphabet"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;

    cout<>x;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"Kleene Closure { "<<x<<"}* = "<<" {^,"<<x<<","<<x<<x<<","<<x<<x<<x<<","<<x<<x<<x<<x<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');

    }

    void closure2() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;

    cout<>x;
    cout<>y;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^,"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }

    void closure3() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }

    int akhir()
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"Apakah Anda ingin menghitung kembali??? (Y/T)"<>a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

    hasilnya…
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Nama : Anggit Puguh Setyawan
    Kelas/ NIM : S1-TI-3L/09.11.3442
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Program Menghitung Kleen Closure
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1. Program Kleene Closure 1 Alphabet
    2. Program Kleene Closure 2 Alphabet
    3. Program Kleene Closure 3 Alphabet
    4. Keluar Dari Program

    Pilihlah untuk memulai (1/2/3 dan 4 untuk Keluar)

    Program Kleene Closure 1 Alphabet
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Masukkan Alphabet : 1
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Kleene Closure { 1}* = {^,1,11,111,1111,…. }

    ====================================================
    Apakah Anda ingin menghitung kembali??? (Y/T)

    Program Kleene Closure 2 Alphabet
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Masukkan Alphabet ke-1 : 1
    Masukkan Alphabet ke-2 : 2
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Kleene Closure { 1,2 }* = {^,1,2,11,12,21,22,111,121,122,212,…. }

    ====================================================
    Apakah Anda ingin menghitung kembali??? (Y/T)

    Program Kleene Closure 3 Alphabet
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Masukkan Alphabet ke-1 : 1
    Masukkan Alphabet ke-2 : 2
    Masukkan Alphabet ke-3 : 3
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Kleene Closure { 12,3 }*= {^,12,3,1212,123,312,33,121212,12312, …. }

    ====================================================
    Apakah Anda ingin menghitung kembali??? (Y/T)

  49. #include
    #include
    #include

    void utama(void);
    int akhir(char );
    void closure1();
    void closure2();
    void closure3();

    void main()
    {
    utama();
    getch();
    }

    void utama(void)
    {
    int n;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<" Nama \t\t: Hangga Agil W"<<endl;
    cout<<" Kelas/ NIM\t: S1-TI-3L/09.11.3445"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"Program Menghitung Kleen Closure"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"1. Program Kleene Closure 1 Alphabet"<<endl;
    cout<<"2. Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"3. Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"4. Keluar Dari Program"<<endl;
    cout<<endl;
    cout<<"Pilihlah untuk memulai (1/2/3 dan 4 untuk Keluar)"<>n;
    clrscr();
    if (n==1)closure1();
    else if (n==2) closure2();
    else if (n==3) closure3();
    else if (n==4) exit(0);
    else cout<<"Maaf masukan salah, Silahkan masukan Yang Benar!!!!"<<endl;
    akhir ('y');
    }
    int akhir(char)
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"Apakah Anda ingin menghitung kembali??? (Y/T)"<>a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

    void closure1(){
    clrscr();
    char x;
    cout<<"Program Kleene Closure 1 Alphabet"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;

    cout<>x;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"Kleene Closure { "<<x<<"}* = "<<" {^,"<<x<<","<<x<<x<<","<<x<<x<<x<<","<<x<<x<<x<<x<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');

    }

    void closure2() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;

    cout<>x;
    cout<>y;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^,"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }

    void closure3() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }

    int akhir()
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"Apakah Anda ingin menghitung kembali??? (Y/T)"<>a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

    hasilnya…
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Nama : Hangga Agil W
    Kelas/ NIM : S1-TI-3L/09.11.3445
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Program Menghitung Kleen Closure
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1. Program Kleene Closure 1 Alphabet
    2. Program Kleene Closure 2 Alphabet
    3. Program Kleene Closure 3 Alphabet
    4. Keluar Dari Program

    Pilihlah untuk memulai (1/2/3 dan 4 untuk Keluar)

    Program Kleene Closure 1 Alphabet
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Masukkan Alphabet : 1
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Kleene Closure { 1}* = {^,1,11,111,1111,…. }

    ====================================================
    Apakah Anda ingin menghitung kembali??? (Y/T)

    Program Kleene Closure 2 Alphabet
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Masukkan Alphabet ke-1 : 1
    Masukkan Alphabet ke-2 : 2
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Kleene Closure { 1,2 }* = {^,1,2,11,12,21,22,111,121,122,212,…. }

    ====================================================
    Apakah Anda ingin menghitung kembali??? (Y/T)

    Program Kleene Closure 3 Alphabet
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Masukkan Alphabet ke-1 : 1
    Masukkan Alphabet ke-2 : 2
    Masukkan Alphabet ke-3 : 3
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Kleene Closure { 12,3 }*= {^,12,3,1212,123,312,33,121212,12312, …. }

    ====================================================
    Apakah Anda ingin menghitung kembali??? (Y/T)

  50. #include
    #include
    #include

    void utama(void);
    int akhir(char );
    void closure1();
    void closure2();
    void closure3();

    void main()
    {
    utama();
    getch();
    }

    void utama(void)
    {
    int n;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<" Nama \t\t: Nata Pribadi"<<endl;
    cout<<" Kelas/ NIM\t: S1-TI-3L/09.11.3443"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"Program Menghitung Kleen Closure"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"1. Program Kleene Closure 1 Alphabet"<<endl;
    cout<<"2. Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"3. Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"4. Keluar Dari Program"<<endl;
    cout<<endl;
    cout<<"Pilihlah untuk memulai (1/2/3) dan 4 untuk Keluar"<>n;
    clrscr();
    if (n==1)closure1();
    else if (n==2) closure2();
    else if (n==3) closure3();
    else if (n==4) exit(0);
    else cout<<"Maaf silahkan masukan Yang Benar!!!!"<<endl;
    akhir ('y');
    }
    int akhir(char)
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"Apakah Anda ingin menghitung kembali??? (Y/T)"<>a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

    void closure1(){
    clrscr();
    char x;
    cout<<"Program Kleene Closure 1 Alphabet"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;

    cout<>x;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"Kleene Closure { "<<x<<"}* = "<<" {^,"<<x<<","<<x<<x<<","<<x<<x<<x<<","<<x<<x<<x<<x<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');

    }

    void closure2() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;

    cout<>x;
    cout<>y;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^,"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }

    void closure3() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    akhir('y');
    }
    int akhir()
    {
    char a;
    cout<<"===================================================="<<endl;
    cout<<"Apakah Anda ingin menghitung kembali??? (Y/T)"<>a;
    clrscr();
    switch(a)
    {
    case ‘y’:
    utama();
    break;
    default:
    abort();
    }
    }

    “Hasilnya PAK”
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Nama : Nata Pribadi
    Kelas/ NIM : S1-TI-3L/09.11.3443
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Program Menghitung Kleen Closure
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1. Program Kleene Closure 1 Alphabet
    2. Program Kleene Closure 2 Alphabet
    3. Program Kleene Closure 3 Alphabet
    4. Keluar Dari Program

    Pilihlah untuk memulai (1/2/3) dan 4 untuk Keluar
    ****************************************************
    ****************************************************
    Program Kleene Closure 3 Alphabet
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Masukkan Alphabet ke-1 : 1
    Masukkan Alphabet ke-2 : a
    Masukkan Alphabet ke-3 : t
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Kleene Closure { 1a,t }*= {^,1a,t,1a1a,1at,t1a,tt,1a1a1a,1at1a, …. }

    ====================================================
    Apakah Anda ingin menghitung kembali??? (Y/T)

  51. //Nama : Reza Rusmana
    //Nim : 09.11.3391
    //Kelas : S1 TI 3L
    //menggunakan program c ++

    #include
    #include
    #include

    void program();
    void cobalagi();
    void main(){
    program();
    getch();
    }
    void program(){

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

    cout<<"\t Program Kleene Closure"<<endl;

    cout<<"======================================================"<<endl;
    cout<<"\tSilakan inputkan 2
    huruf/angka"<<endl;
    cout<<"Setiap inputan hanya 1 karakter."<<endl;
    cout<<"======================================================"<<endl;

    /*Program Kleene
    Closure*/

    char x, y;
    cout<>x;
    cout<>y;
    cout<<"———————————-
    ="<<endl;
    cout<<"Kleene Closure
    { "<<x<<","<<y<<" }* =
    "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }
    "<<endl;
    cout<<endl;
    cobalagi();
    }
    /*Pilihan untuk mengakhiri
    program atau mengulang
    kembali*/
    void cobalagi()
    {
    int n;
    cout<<"+++++++++++++++++____________+++++++++++++++++++"<<endl;
    cout<>n;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<"maaf pilih 1 atau 2"<<endl;

    }
    }

  52. — ALHAMDULILLAH…. akhirnya!!! ^.^ —

    #include
    #include
    #include

    void closure1();
    void closure2();
    int menu();

    main() {
    int p;
    p = menu();
    clrscr();
    switch(p) {
    case 1:
    closure1();
    break;
    case 2:
    closure2();
    break;
    case 3:
    exit(0);
    }
    return 0;
    }

    void closure1() {
    clrscr();
    char x, y;
    cout<<"Kleene Closure Program 2 Alphabets"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    menu();
    }

    void closure2() {
    clrscr();
    char x, y, z;
    cout<<"Kleene Closure Program 3 Alphabets"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    menu();
    }

    int menu(void) {
    int n;
    cout<<"MY KLEENE CLOSURE PROGRAM"<<endl;
    cout<<"———————-"<<endl;
    cout<<"Nama \t\t: Sefianita R. Pramana"<<endl;
    cout<<"My Identities\t: S1-TI-3L / 09.11.3422"<<endl;
    cout<<"———————————-"<<endl;
    cout<<"\n1. With 2 Alphabets Input"<<endl;
    cout<<"2. With 3 Alphabets Input"<<endl;
    cout<<"3. Exit"<<endl;
    cout<>n;
    clrscr();
    return n;
    }

    http://www.4shared.com/file/gOHbVIwL/3L___09113422.html

  53. #include
    #include
    #include
    char a, x, y, z;
    void closure1();
    void closure2();
    int menu();
    main() {
    int p;
    p=menu();
    switch(p) {
    case 1:
    closure1();
    break;
    case 2:
    closure2();
    break;
    case 3:
    exit(0);
    }return 0;
    }
    void closure1() {
    clrscr();
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    cout<>a;
    if(a==’y’ || a==’Y’) menu();
    menu();
    }
    void closure2() {
    clrscr();
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    cout<>a;
    if(a==’y’ || a==’Y’) menu();
    menu();
    }
    int menu(void) {
    clrscr();
    int n;
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"———————-"<<endl;
    cout<<"Nama \t\t: Moh. Eko S.C.O."<<endl;
    cout<<"Kelas/ NIM\t: S1-TI-3L/ 09.11.3392"<<endl;
    cout<<"———————————-"<<endl;
    cout<<"\n1. Input 2 Alphabet/ Angka"<<endl;
    cout<<"2. Input 3 Alphabet/ Angka"<<endl;
    cout<<"3. Exit"<<endl;
    cout<>n;
    return n;
    }

    Hasilnya :

    PROGRAM KLEENE CLOSURE
    ——————————————-
    1. Input 2 Alphabet/ Angka
    2. Input 3 Alphabet/ Angka
    3. Exit
    Silakan Pilih Salah Satu : _

    Misal kita pilih 1, maka akan muncul sebagai berikut :
    Program Kleene Closure 2 Alphabet
    ————————————————–
    Masukkan Alphabet/ Angka ke-1 : a
    Masukkan Alphabet/ Angka ke-2 : b
    ————————————————-
    Kleene Closure {a,b}*={^,a,b,aa,ab,ba,bb,aaa,aba,abb,bab,….}

    Kembali ke Menu Utama?[y/n] : _

    Jika kita pilih y maka akan kembali ke menu utama yaitu :
    PROGRAM KLEENE CLOSURE
    ——————————————-
    1. Input 2 Alphabet/ Angka
    2. Input 3 Alphabet/ Angka
    3. Exit
    Silakan Pilih Salah Satu : _

  54. #include
    #include
    #include

    void fungsi();

    void main(){
    fungsi();
    getch();
    }
    void fungsi(){
    int i ;
    char x,y;
    cout<<"Nama : Salimatun Musarofah"<<endl;
    cout<<"NIM : 09.11.3418"<<endl;
    cout<<"Kelas : S1 TI 3L"<<endl;
    cout<<" Progam Kleene Closure"<<endl;
    cout<<" 2 Masukan "<<endl;
    cout<<"——————————————————-"<<endl;
    cout<<endl;
    cout<>x;
    cout<>y;
    cout<<"——————————————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {"<<x<<","<<y<<","<<x<<x<< ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<y<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<" }"<<endl;
    cout<<endl;
    int n;
    cout<<"——————————————————-"<<endl;
    cout<>n;
    clrscr();
    switch(n)
    {
    case 1:
    fungsi();
    break;
    case 2:
    exit(0);
    default:
    cout<<"isi yang benar!"<<endl;
    } getch();
    }

    HASIL PROGRAMNYA:
    Nama: Salimatun Musarofah
    Nim: 09.11.3418
    Kelas: S1TI-3L
    Program Kleene Closure
    2 masukkan
    ———————————-
    1.masukkan alfabet/angka=1
    2. masukkan alfabet/angka=a
    ————————————-
    kleene closure (1,a)*=(1,a,11,1a,a1,aa,11a,1a1,1aa,a1a)
    —————————————–
    coba lagi?[pilih 1=ya; pilih 2=tidak]=

  55. /*Lisa Kumala Dewi
    09.11.3408
    S1 TI 3L
    */

    #include
    #include
    #include

    void rumus();
    void pilihan();

    void main(){
    rumus();
    getch();
    }

    void rumus(){

    char x,y;
    cout<<"Nama : Lisa Kumala Dewi"<<endl;
    cout<<"NIM : 09.11.3408"<<endl;
    cout<<"Kelas : S1 TI 3L"<<endl;
    cout<<"******************************"<<endl;
    cout<<"Tuliskan 2 input saja (huruf/angka)"<<endl;
    cout<<"******************************"<<endl;

    cout<>x;
    cout<>x;

    cout<<"******************************"<<endl;
    cout<<endl;
    cout<<"Kleene closure { "<<x<<","<<y<<" }* = {"<<x<<","<<y<<","<<x<<""<<x<<","<<y<<""<<y<<","<<x<<""<<y<<","<<y<<""<<x<<"}"<<endl;
    cout<<endl;
    pilihan();
    }

    void pilihan()
    {

    int p;
    cout<<"**************************************************"<<endl;
    cout<>p;
    clrscr();
    switch(p)
    {
    case 1:
    rumus();
    break;
    case 2:
    exit(0);
    default:
    cout<<"Anda salah!Coba lagi yang benar."<<endl;
    }
    }

  56. Nama : Rika Sulistyowati
    NIM : 09.11.3439
    Kelas :S1-TI-3L

    #include
    #include
    #include

    char a[5];
    void program();
    void tanya();

    void main(){
    program();
    getch();
    }

    void program(){
    int i ;
    char x,y;
    cout<<"Nama : Rika Sulistyowati"<<endl;
    cout<<"NIM : 09.11.3439"<<endl;
    cout<<"Kelas : S1-TI-3L"<<endl;

    cout<<"……………………………………………….."<<endl;

    cout<<"Silakan anda masukan 2 huruf/angka"<<endl;
    cout<<"INGAT : Batasanya hanya sampai dua"<<endl;
    for(i=1;i<=2;i++)
    {
    cout<<"Masukkan hufur/angka ke – "<<ia[i];
    }
    x = a[1];
    y = a[2];
    cout<<"————————Jawaban——————–"<<endl;
    cout<<endl;
    cout<<"Kleene closure { "<<x<<","<<y<<" } adalah {"<<x<<","<<y<<","<<x<<""<<x<<","<<y<<""<<y<<","<<x<<""<<y<<","<<y<<""<<x<<","<<x<<""<<x<<""<<x<<","<<y<<""<<y<<""<<y<<"…..dst.}"<<endl;
    cout<<endl;
    tanya();
    }

    void tanya()
    {

    int n;
    cout<<"——————————————————-"<<endl;
    coutn;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<"MAAF,pilihan yang anda pilih ternyata salah….!!!!!"<<endl;
    }
    }

    Hasil :
    Nama : Rika Sulistyowati
    NIM : 09.11.3439
    Kelas : S1-TI-3L
    ………………………………………………..
    Silakan anda masukan 2 huruf/angka
    INGAT : Batasanya hanya sampai dua
    Masukkan hufur/angka ke – 1 = x
    Masukkan hufur/angka ke – 2 = y
    ————————Jawaban——————–

    Kleene closure { x,y } adalah {x,y,xx,yy,xy,yx,xxx,yyy…..dst.}

    ——————————————————-
    Silahkan mencoba lagi? [pilih 1 = ya ; pilih 2 = tidak] =

  57. /*Diona Destri Pramudhani
    09.11.3400
    S1 TI 3L
    */

    #include
    #include
    #include

    void hitung();
    void menu();

    void main(){
    hitung();
    getch();
    }

    void hitung(){
    int i ;
    char x,y;
    cout<<"Nama : Diona Destri Pramudhani"<<endl;
    cout<<"NIM : 09.11.3400"<<endl;
    cout<<"Kelas : S1 TI 3L"<<endl;
    cout<<"=============================="<<endl;
    cout<<"Masukkan 2 input (huruf/angka)"<<endl;
    cout<<endl;

    cout<>x;
    cout<>y;

    cout<<endl;
    cout<<"Masuk ke rumus…"<<endl;
    cout<<"Kleene closure { "<<x<<","<<y<<" }* = {"<<x<<","<<y<<","<<x<<""<<x<<","<<y<<""<<y<<","<<x<<""<<y<<","<<y<<""<<x<<"}"<<endl;
    cout<<endl;
    menu();
    }

    void menu()
    {

    int m;
    cout<<"======================================================="<<endl;
    cout<>m;
    clrscr();
    switch(m)
    {
    case 1:
    hitung();
    break;
    case 2:
    exit(0);
    default:
    cout<<"Error!Choose the right one please!"<<endl;
    }
    }

  58. #include
    #include
    #include

    void closure1();
    void closure2();
    int menu();

    main() {
    int p;
    p=menu();
    clrscr();
    switch(p) {
    case 1:
    closure1();
    break;
    case 2:
    closure2();
    break;
    case 3:
    exit(0);
    }
    return 0;
    }

    void closure1() {
    clrscr();
    char x, y;
    cout<< "Program Kleene Closure 2 Alphabet"<<endl;
    cout<< "———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<< "————————-"<<endl;
    cout<< "Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    menu();
    }

    void closure2() {
    clrscr();
    char x, y, z;
    cout<< "Program Kleene Closure 3 Alphabet"<<endl;
    cout<< "———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<< "————————-"<<endl;
    cout<< "Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    menu();
    }
    int menu(void) {
    int n;
    cout<< "Program Kleene Closure"<<endl;
    cout<< "———————-"<<endl;
    cout<< "Nama \t\t: Arif Rahman"<<endl;
    cout<< "Kelas/ NIM\t: S1 TI_3L/ 09.11.3447"<<endl;
    cout<< "———————————-"<<endl;
    cout<<"\n1. Input 2 Alphabet"<<endl;
    cout<<"2. Input 3 Alphabet"<<endl;
    cout<< "3. Exit"<<endl;
    cout<>n;
    clrscr();
    return n;
    }

  59. #include
    #include
    #include

    char a[5];
    void program();
    void tanya();

    void main() {
    program();
    getch();
    }

    void program() {
    int i ;
    char x,y;
    cout<<"Nama : Nur Hariyadi"<<endl;
    cout<<"NIM : 09.11.3390"<<endl;
    cout<<"Kelas : S1 TI 3L"<<endl;
    cout<<"——————————————————-"<<endl;
    cout<<"Silakan masukan 2 alphabet (huruf/angka)"<<endl;
    cout<<"NB : Batasan cuma sampai dua"<<endl;
    cout<<"——————————————————-"<<endl;

    for(i=1;i<=2;i++)
    {
    cout<<"Input alphabet ke – "<<i<>a[i];
    }
    x = a[1];
    y = a[2];
    cout<<"——————————————————-"<<endl;
    cout<<endl;
    cout<<"Kleene closure { "<<x<<","<<y<<" } = {"<<x<<","<<y<<","<<x<<""<<x<<","<<y<<""<<y<<","<<x<<""<<y<<","<<y<<""<<x<<","<<x<<""<<x<<""<<x<<","<<y<<""<<y<<""<<y<<"}"<<endl;
    cout<<endl;
    tanya();
    }

    void tanya()
    {
    int n;
    cout<<"——————————————————-"<<endl;
    cout<>n;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<"Koplak! Pilih yang bener boss!"<<endl;
    }
    }

    Penjelasan program :
    1. Ketika program dijalankan, main akan dieksekusi pertama kali, kemudian dalam main memanggil fungsi program.
    2. fungsi program akan menampilkan nama,kelas dan sebagainya
    3. disini saya menggunakan kombinasi perulangan dan array, jadi inputnya menjadi lebih sederhana.
    4. kemudian dibagian setelah fungsi for, input yang semula array saya ubah lagi menjadi variabel biasa supaya lebih mudah
    5. kleene closure ditampilkan
    6. memanggil fungsi tanya (menanyakan apakah user mau menghitung lagi atau tidak)
    7. selesai

  60. #include
    #include
    #include

    void closure1();
    void closure2();
    int menu();

    main() {
    int p;
    p=menu();
    clrscr();
    switch(p) {
    case 1:
    closure1();
    break;
    case 2:
    closure2();
    break;
    case 3:
    exit(0);
    }
    return 0;
    }

    void closure1() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    menu();
    }

    void closure2() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    menu();
    }
    int menu(void) {
    int n;
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"———————-"<<endl;
    cout<<"Nama \t\t: Anggoro Triono "<<endl;
    cout<<"Kelas/ NIM\t: S1-TI-3L/ 09.11.3417"<<endl;
    cout<<"———————————-"<<endl;
    cout<<"\n1. Input 2 Alphabet"<<endl;
    cout<<"2. Input 3 Alphabet"<<endl;
    cout<<"3. Keluar "<<endl;
    cout<>n;
    clrscr();
    return n;
    }

  61. #include
    #include
    #include

    void closure1();
    void closure2();
    int menu();

    main() {
    int p;
    p=menu();
    clrscr();
    switch(p) {
    case 1:
    closure1();
    break;
    case 2:
    closure2();
    break;
    case 3:
    exit(0);
    }
    return 0;
    }

    void closure1() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    menu();
    }

    void closure2() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    menu();
    }
    int menu(void) {
    int n;
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"———————-"<<endl;
    cout<<"Nama \t\t: Robet Prayogo "<<endl;
    cout<<"Kelas/ NIM\t: S1-TI-3L/ 09.11.3416"<<endl;
    cout<<"———————————-"<<endl;
    cout<<"\n1. Inputkan 2 Alphabet"<<endl;
    cout<<"2. Inputkan 3 Alphabet"<<endl;
    cout<<"3. Keluar "<<endl;
    cout<>n;
    clrscr();
    return n;
    }

  62. #include
    #include
    #include

    void closure1();
    void closure2();
    int menu();

    main() {
    int p;
    p=menu();
    clrscr();
    switch(p) {
    case 1:
    closure1();
    break;
    case 2:
    closure2();
    break;
    case 3:
    exit(0);
    }
    return 0;
    }

    void closure1() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 bilangan"<<endl;
    cout<<"=========================="<<endl;

    cout<>x;
    cout<>y;
    cout<<"==================="<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    menu();
    }

    void closure2() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Bilangan"<<endl;
    cout<<"========================="<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"==============="<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    menu();
    }
    int menu(void) {
    int n;
    cout<<” Nama = AGUS BUDI SETIAWAN “
    cout<<” Nim = 09.11.3404 ”
    cout<<”==============================”
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"==========================="<<endl;
    cout<<"\n1. Input 2 Bilangan"<<endl;
    cout<<"\n2. Input 3 Bilangan"<<endl;
    cout<<"\n3. Exit"<<endl;
    cout<>n;
    clrscr();
    return n;
    getch();
    }

  63. #include
    #include
    #include

    void closure1();
    void closure2();
    int menu();

    main() {
    int p;
    p=menu();
    clrscr();
    switch(p) {
    case 1:
    closure1();
    break;
    case 2:
    closure2();
    break;
    case 3:
    exit(0);
    }
    return 0;
    }

    void closure1() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 bilangan"<<endl;
    cout<<"=========================="<<endl;

    cout<>x;
    cout<>y;
    cout<<"==================="<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    menu();
    }

    void closure2() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Bilangan"<<endl;
    cout<<"========================="<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"==============="<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    menu();
    }
    int menu(void) {
    int n;
    cout<<” Nama = AGUS BUDI SETIAWAN “
    cout<<” Nim = 09.11.3404 ”
    cout<<”==============================”
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"==========================="<<endl;
    cout<<"\n1. Input 2 Bilangan"<<endl;
    cout<<"\n2. Input 3 Bilangan"<<endl;
    cout<<"\n3. Exit"<<endl;
    cout<>n;
    clrscr();
    return n;
    getch ();
    }

  64. #include
    #include
    #include
    void closure1();
    void closure2();
    int menu();

    main() {
    int t;
    t=menu();
    clrscr();
    switch(t) {
    case 1:
    closure1();
    break;
    case 2:
    closure2();
    break;
    case 3:
    exit(0);
    }
    return 0;
    }

    void closure1() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"=========================================="<<endl;

    cout<>x;
    cout<>y;
    cout<<"=========================================="<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    menu();
    }

    void closure2() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"================================================="<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"================================================="<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    menu();
    }
    int menu(void) {
    int n;
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"================================================"<<endl;
    cout<<"Nama\t: Titi Rahmani"<<endl;
    cout<<"Kelas\t: S1-TI-3L"<<endl;
    cout<<"NIM\t: 09.11.3388"<<endl;
    cout<<"================================================="<<endl;
    cout<<"\n1. Input 2 Alphabet"<<endl;
    cout<<"2. Input 3 Alphabet"<<endl;
    cout<<"3. keluar"<<endl;
    cout<>n;
    clrscr();
    return n;
    }

  65. #include
    #include
    #include

    char a[5];
    void program();
    void cobalagi();

    void main(){
    program();
    getch();
    }

    void program(){

    /*Tampilan Program */
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"Nama : Raras Rizky Umaira"<<endl;
    cout<<"NIM : 09.11.3431"<<endl;
    cout<<"Kelas: S1TI-3L"<<endl;
    cout<<"======================================================"<<endl;
    cout<<"Silakan masukkan 2 huruf/angka"<<endl;
    cout<<"**batasan sampai 2 karakter saja**"<<endl;
    cout<<"======================================================"<<endl;

    /*Rumus dan Program Kleene Closure*/
    char x, y;
    cout<>x;
    cout<>y;
    cout<<"======================================================"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    cobalagi();
    }

    /*Pilihan untuk mengakhiri program atau mengulang kembali*/
    void cobalagi()
    {
    int n;
    cout<>n;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<"Maaf input hanya terbatas 1-2 karakter saja, silahkan mencoba kembali"<<endl;
    getch();
    cobalagi();
    }
    }

  66. #include
    #include
    #include

    void closure1();
    void closure2();
    int menu();

    main() {
    int p;
    p=menu();
    clrscr();
    switch(p) {
    case 1:
    closure1();
    break;
    case 2:
    closure2();
    break;
    case 3:
    exit(0);
    }
    return 0;
    }

    void closure1() {
    clrscr();
    char x, y;
    cout<<"Program Kleene Closure 2 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    menu();
    }

    void closure2() {
    clrscr();
    char x, y, z;
    cout<<"Program Kleene Closure 3 Alphabet"<<endl;
    cout<<"———————————"<<endl;

    cout<>x;
    cout<>y;
    cout<>z;
    cout<<"————————-"<<endl;
    cout<<"Kleene Closure { "<<x<<y<<","<<z<<" }*= "<<" {^"<<","<<x<<y<<","<<z<<
    ","<<x<<y<<x<<y<<","<<x<<y<<z<<","<<z<<x<<y<<","<<z<<z<<","<<x<<y<<x<<y<<x<<y<<
    ","<<x<<y<<z<<x<<y<<","<<" …."<<" }"<<endl;
    cout<<endl;
    menu();
    }
    int menu(void) {
    int n;
    cout<<"PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"———————-"<<endl;
    cout<<"Nama \t\t: IKHWAN MAJID FUSIHANTO "<<endl;
    cout<<"Kelas/ NIM\t: S1-TI-3L/ 09.11.3415"<<endl;
    cout<<"———————————-"<<endl;
    cout<<"\n1. Masukkan 2 Alphabet"<<endl;
    cout<<"2. Masukkan 3 Alphabet"<<endl;
    cout<<"3. Keluar "<<endl;
    cout<>n;
    clrscr();
    return n;
    }

  67. Private Sub Combo1_Click()
    If Combo1.Text = “1 input” Then
    Label1.Visible = True
    Label2.Visible = True
    Label3.Visible = True
    Label7.Visible = True
    Text1.Visible = True
    Command1.Enabled = True
    Command2.Enabled = True

    Text2.Visible = False
    Label4.Visible = False
    Text3.Visible = False
    Label10.Visible = False
    Label3.Caption = “}”
    Label5.ForeColor = &HFFFFFF
    Label6.ForeColor = &HFFFFFF
    Label8.ForeColor = &HFFFFFF
    Image1.Visible = False
    Text1.Text = “”
    Text2.Text = “”
    Text3.Text = “”
    Label9.Caption = “”
    Text1.SetFocus
    Text1.SetFocus

    ElseIf Combo1.Text = “2 input” Then
    Label1.Visible = True
    Label2.Visible = True
    Label3.Visible = True
    Label4.Visible = True
    Label7.Visible = True
    Text1.Visible = True
    Text2.Visible = True
    Command1.Enabled = True
    Command2.Enabled = True
    Label5.ForeColor = &HFFFFFF
    Label6.ForeColor = &HFFFFFF
    Label8.ForeColor = &HFFFFFF
    Label3.Caption = “,”
    Label4.Caption = “}”
    Image1.Visible = False
    Text3.Visible = False
    Label10.Visible = False
    Text1.Text = “”
    Text2.Text = “”
    Text3.Text = “”
    Label9.Caption = “”
    Text1.SetFocus

    Else
    Label1.Visible = True
    Label2.Visible = True
    Label3.Visible = True
    Label4.Visible = True
    Label7.Visible = True
    Text1.Visible = True
    Text2.Visible = True
    Command1.Enabled = True
    Command2.Enabled = True
    Text3.Visible = True
    Label10.Visible = True
    Label5.ForeColor = &HFFFFFF
    Label6.ForeColor = &HFFFFFF
    Label8.ForeColor = &HFFFFFF
    Label3.Caption = “,”
    Label4.Caption = “,”
    Image1.Visible = False
    Text1.Text = “”
    Text2.Text = “”
    Text3.Text = “”
    Label9.Caption = “”
    Text1.SetFocus
    End If
    End Sub

    Private Sub Command1_Click()
    If Combo1.Text = “1 input” Then
    Label9.Caption = “,” + Text1.Text + “,” + Text1.Text + Text1.Text + “,” + “…” + “}”
    Label8.ForeColor = &H0&
    Image1.Visible = True
    ElseIf Combo1.Text = “2 input” Then
    Label9.Caption = “,” + Text1.Text + “,” + Text2.Text + “,” + Text1.Text + Text1.Text + “,” + Text1.Text + Text2.Text _
    + “,” + Text2.Text + Text1.Text + “,” + Text2.Text + Text2.Text + “,” + “…” + “}”
    Label8.ForeColor = &H0&
    Image1.Visible = True
    Else
    Label9.Caption = “,” + Text1.Text + “,” + Text2.Text + “,” + Text3.Text + “,” + Text1.Text + Text1.Text + “,” _
    + Text1.Text + Text2.Text + “,” + Text1.Text + Text3.Text + “,” + Text2.Text + Text1.Text + “,” _
    + Text2.Text + Text2.Text + “,” + Text2.Text + Text3.Text + “,” + Text3.Text + Text1.Text + “,” _
    + Text3.Text + Text2.Text + “,” + Text3.Text + Text3.Text + “,” + “…” + “}”
    Label8.ForeColor = &H0&
    Image1.Visible = True
    End If
    End Sub

    Private Sub Command2_Click()
    Label5.ForeColor = &HFFFFFF
    Label6.ForeColor = &HFFFFFF
    Label8.ForeColor = &HFFFFFF
    Image1.Visible = False
    Text1.Text = “”
    Text2.Text = “”
    Text3.Text = “”
    Label9.Caption = “”
    Text1.SetFocus
    End Sub

    Private Sub Form_Load()
    Text1.MaxLength = 1
    Text2.MaxLength = 1
    End Sub

    Private Sub Text1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
    If Not Text1.Text = “” Then
    If Combo1.Text = “2 input” Or Combo1.Text = “3 input” Then
    Text2.SetFocus
    ElseIf Combo1.Text = “1 input” Then
    Command1.SetFocus
    Else
    Text1.SetFocus
    End If
    End If
    End If
    End Sub

    Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
    If Text1.Text = “” Then
    Text1.SetFocus
    Label5.ForeColor = &HFFFFFF
    Label6.ForeColor = &HFFFFFF
    ElseIf Combo1.Text = “1 input” Then
    Label5.Caption = “{” + Text1.Text + “}” + “*”
    Label5.ForeColor = &HFF&
    Label6.ForeColor = &H0&
    End If
    End Sub

    Private Sub Text2_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
    If Not Text2.Text = “” Then
    If Combo1.Text = “2 input” Then
    Command1.SetFocus
    ElseIf Combo1.Text = “3 input” Then
    Text3.SetFocus
    Else
    Text2.SetFocus
    End If
    End If
    End If
    End Sub

    Private Sub Text2_KeyUp(KeyCode As Integer, Shift As Integer)
    If Text2.Text = “” Then
    Text2.SetFocus
    Label5.ForeColor = &HFFFFFF
    Label6.ForeColor = &HFFFFFF
    ElseIf Combo1.Text = “2 input” Then
    Label5.Caption = “{” + Text1.Text + “,” + Text2.Text + “}” + “*”
    Label5.ForeColor = &HFF&
    Label6.ForeColor = &H0&
    End If
    End Sub

    Private Sub Text3_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
    If Not Text3.Text = “” Then
    Command1.SetFocus
    Else
    Text3.SetFocus
    End If
    End If
    End Sub

    Private Sub Text3_KeyUp(KeyCode As Integer, Shift As Integer)
    If Text3.Text = “” Then
    Text3.SetFocus
    Label5.ForeColor = &HFFFFFF
    Label6.ForeColor = &HFFFFFF
    Else
    Label5.Caption = “{” + Text1.Text + “,” + Text2.Text + “,” + Text3.Text + “}” + “*”
    Label5.ForeColor = &HFF&
    Label6.ForeColor = &H0&
    End If
    End Sub

    Hasilnya :

    {a}*= {ε, a, aa, …}

    {0,1}*={ ε, 0, 1, 00, 01, 10, 11,…}

    {‘a’, ‘b’, ‘c’}* = { ε, a, b, c, aa, ab, ac, ba, bb, bc, ca, cb, cc, …}.

    Mohon untuk lebih jelasnya, mengenai tampilan dan coding program untuk didownload di link berikut :
    http://www.ziddu.com/download/12858153/KLEENECLOSUREADHIDWIPRABAWA09.11.3449.docx.html
    Terima Kasih.

  68. Nama : Rika Sulistyowati
    NIM : 09.11.3439
    Kelas :S1-TI-3L

    #include
    #include
    #include

    char a[5];
    void program();
    void tanya();

    void main(){
    program();
    getch();
    }

    void program(){
    int i ;
    char x,y;
    cout<<"Nama : Rika Sulistyowati"<<endl;
    cout<<"NIM : 09.11.3439"<<endl;
    cout<<"Kelas : S1-TI-3L"<<endl;

    cout<<"……………………………………………….."<<endl;

    cout<<"Silakan anda masukan 2 huruf/angka"<<endl;
    cout<<"INGAT : Batasanya hanya sampai dua"<<endl;
    for(i=1;i<=2;i++)
    {
    cout<<"Masukkan hufur/angka ke – "<<i<>a[i];
    }
    x = a[1];
    y = a[2];
    cout<<"————————Jawaban——————–"<<endl;
    cout<<endl;
    cout<<"Kleene closure { "<<x<<","<<y<<" } adalah {"<<x<<","<<y<<","<<x<<""<<x<<","<<y<<""<<y<<","<<x<<""<<y<<","<<y<<""<<x<<","<<x<<""<<x<<""<<x<<","<<y<<""<<y<<""<<y<<"…..dst.}"<<endl;
    cout<<endl;
    tanya();
    }

    void tanya()
    {

    int n;
    cout<<"——————————————————-"<<endl;
    cout<>n;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<"MAAF,pilihan yang anda pilih ternyata salah….!!!!!"<<endl;
    }
    }

    Hasil :
    Nama : Rika Sulistyowati
    NIM : 09.11.3439
    Kelas : S1-TI-3L
    ………………………………………………..
    Silakan anda masukan 2 huruf/angka
    INGAT : Batasanya hanya sampai dua
    Masukkan hufur/angka ke – 1 = x
    Masukkan hufur/angka ke – 2 = y
    ————————Jawaban——————–

    Kleene closure { x,y } adalah {x,y,xx,yy,xy,yx,xxx,yyy…..dst.}

    ——————————————————-
    Silahkan mencoba lagi? [pilih 1 = ya ; pilih 2 = tidak] =

  69. setelah saya periksa kembali,, sepertinya ada yg kurang pak..
    yaitu.. :

    #include
    #include
    #include

    kenapa “iostream.h ,, conio.h ,, & stdlib.h” -nya gk bs kebaca ya pak.??

  70. /* Program ini dapat dijalankan dengan C++*/
    /* AFRIAN DIMAS DANISWORO(09.11.3398)/ S1.TI-3L */

    #include
    #include
    #include

    char a[5];
    void program();
    void cobalagi();

    void main(){
    program();
    getch();
    }

    void program(){

    /*Tampilan Program */
    cout<<"______________________________________________________"<<endl;
    cout<<"\t PROGRAM KLEENE CLOSURE"<<endl;
    cout<<"\tOleh: Afrian Dimas Danisworo"<<endl;
    cout<<"\t\t09.11.3398"<<endl;
    cout<<"______________________________________________________"<<endl;
    cout<<"======================================================"<<endl;
    cout<<"\tSilakan inputkan 2 huruf/angka"<<endl;
    cout<<"NB : Batasan cuma sampai 2 (dua) karakter saja. ^^"<<endl;
    cout<<"======================================================"<<endl;

    /*Rumus dan Program Kleene Closure*/
    char x, y;
    cout<>x;
    cout<>y;
    cout<<"———————————- ="<<endl;
    cout<<"Kleene Closure { "<<x<<","<<y<<" }* = "<<" {^"<<x<<","<<y<<","<<x<<x<<
    ","<<x<<y<<","<<y<<x<<","<<y<<y<<","<<x<<x<<x<<","<<x<<y<<x<<","<<x<<y<<y<<
    ","<<y<<x<<y<<","<< "…."<<" }"<<endl;
    cout<<endl;
    cobalagi();
    }

    /*Pilihan untuk mengakhiri program atau mengulang kembali*/
    void cobalagi()
    {
    int n;
    cout<<"==++==++==++==++==++==++==++==++==++==++==++==++==++=="<<endl;
    cout<>n;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<"Maaf,, input hanya terbatas 1-2 karakter saja,, silahkan mencoba kembali. ^^"<<endl;
    getch();
    cobalagi();
    }
    }

  71. #include
    #include
    #include

    char a[5];
    void program();
    void tanya();

    void main(){
    program();
    getch();
    }

    void program(){
    int i ;
    char x,y;
    cout<<"Nama : wahyu sulistya darmawan"<<endl;
    cout<<"NIM : 09.11.3434"<<endl;
    cout<<"Kelas : S1 TI 3L"<<endl;
    cout<<"——————————————————-"<<endl;
    cout<<"Silakan masukan 2 alphabet (huruf/angka)"<<endl;
    cout<<"NB : cuma sampai dua aja batasanya "<<endl;
    cout<<"——————————————————-"<<endl;

    for(i=1;i<=2;i++)
    {
    cout<<"Input alphabet ke – "<<i<>a[i];
    }

    cout<<"——————————————————-"<<endl;
    cout<<endl;
    cout<<"Kleene closure { "<<x<<","<<y<<" }* = {"<<x<<","<<y<<","<<x<<""<<x<<","<<y<<""<<y<<","<<x<<""<<y<<","<<y<<""<<x<<"}"<<endl;
    cout<<endl;
    tanya();
    }

    void tanya() //buatlah perbedaan nama fungsi gan..!!
    {

    int n;
    cout<<"——————————————————-"<<endl;
    cout<>n;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<"salah gan! Pilih yang bener gan!"<<endl;
    }
    }

    • #include
      #include
      #include

      char a[5];
      void program();
      void tanya();

      void main(){
      program();
      getch();
      }

      void program(){
      int i ;
      char x,y;
      cout<<"Nama : wahyu sulistya darmawan"<<endl;
      cout<<"NIM : 09.11.3434"<<endl;
      cout<<"Kelas : S1 TI 3L"<<endl;
      cout<<"——————————————————-"<<endl;
      cout<<"Silakan masukan 2 alphabet (huruf/angka)"<<endl;
      cout<<"NB : cuma sampai dua aja batasanya "<<endl;
      cout<<"——————————————————-"<<endl;

      for(i=1;i<=2;i++)
      {
      cout<<"Input alphabet ke – "<<i<>a[i];
      }

      cout<<"——————————————————-"<<endl;
      cout<<endl;
      cout<<"Kleene closure { "<<x<<","<<y<<" }* = {"<<x<<","<<y<<","<<x<<""<<x<<","<<y<<""<<y<<","<<x<<""<<y<<","<<y<<""<<x<<"}"<<endl;
      cout<<endl;
      tanya();
      }

      void tanya() //buatlah perbedaan nama fungsi gan..!!
      {

      int n;
      cout<<"——————————————————-"<<endl;
      cout<>n;
      clrscr();
      switch(n)
      {
      case 1:
      program();

  72. #include
    #include
    #include

    char a[5];
    void program();
    void tanya();

    void main(){
    program();
    getch();
    }

    void program(){
    int i ;
    char x,y;
    cout<<"Nama : Seto Ritma RUmekso"<<endl;
    cout<<"NIM : 09.11.3397"<<endl;
    cout<<"Kelas : S1 TI 3L"<<endl;
    cout<<"——————————————————-"<<endl;
    cout<<"Silakan masukan 2 alphabet (huruf/angka)"<<endl;
    cout<<"NB : Batasan cuma sampai dua"<<endl;
    cout<<"——————————————————-"<<endl;

    for(i=1;i<=2;i++)
    {
    cout<<"Input alphabet ke – "<<i<>a[i];
    }

    cout<<"——————————————————-"<<endl;
    cout<<endl;
    cout<<"Kleene closure { "<<x<<","<<y<<" }* = {"<<x<<","<<y<<","<<x<<""<<x<<","<<y<<""<<y<<","<<x<<""<<y<<","<<y<<""<<x<<"}"<<endl;
    cout<<endl;
    tanya();
    }

    void tanya()
    {

    int n;
    cout<<"——————————————————-"<<endl;
    cout<>n;
    clrscr();
    switch(n)
    {
    case 1:
    program();
    break;
    case 2:
    exit(0);
    default:
    cout<<"Salah!"<<endl;
    }
    }

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s