Minggu, 24 Juni 2012

Laporan Praktikum Modul 8 : Queue (Kristianus Unang - Sistem Informasi - S1 - 201101018)

MODUL 8 : Queue


Disusun Oleh :

Kristianus Unang
201101018

Dosen :

Yosef Murya Kusuma Ardhana , S.T

Jurusan Sistem Informasi
Sekolah Tinggi Ilmu Komputer
" Yos Sudarso "
Purwokerto

---------------------------------------------------------------------------------------------------------------------
 --------------------------------------------------------------------------------------------------------------------- 

Laporan Praktikum ( borland edition )
script

#include <iostream.h>
#include <conio.h>

int f,r,df;
int qu[50];
void enQueue(void);
void deQueue(void);
void Tampilkan(void);

main()
{
     int k;
     for (k=0; k<50; k++)
     qu[k]=0;
    
     while(1)
     {
       cout<<endl;
       cout<<"============PILIHAN========="<<endl;
       cout<<" 1)enQueue"<<endl;
       cout<<" 2)deQueue"<<endl;
       cout<<" 3)Tampilkan Queue"<<endl;
       cout<<" 4)Keluar"<<endl;
       cout<<"=============================";
       cout<<endl;
      
       cout<<"Masukkan Pilihan Anda ( 1, 2, 3, 4) dalam melakukan Queue: ";
       cin>>k;
       if (k==1)enQueue();
       if (k==2)deQueue();
       if (k==3)Tampilkan();
       if (k==4)break;
       }
     }//End Main/
     void enQueue(){
          cout<<"Masukkan Elemen: ";
          cin>>qu[r];
          r++;
     }
     void deQueue(){
          qu[f]=0;
          f++;
          }
     void Tampilkan(){
          int i;
          cout<<endl<<"Queue: "<<endl;
          for(i=f;i<r;i++)
          cout<<qu[i]<<" , ";
          cout<<endl<<"press any key.....";
          getche();
          }

 
screenshoot program

8.1
  

Laporan Praktikum (eclipse edition)
script

//============================================================================
// Name        : queue.cpp
// Author      : unang
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
using namespace std;
int f,r,df;
int qu[50];
void enQueue (void);
void deQueue (void) ;
int Tampilkan (void);
int main (){
       int k;
       for (k=0;k<50;k++)
              qu[k]=0;
       while (1)
       {

              cout<<endl;
              cout<<"+++++Pilihan++++++"<<endl;
              cout<<" 1. enQueue"<<endl;
              cout<<" 2. deQueue"<<endl;
              cout<<" 3. Tampilkan queue"<<endl;
              cout<<"++++++++++++++++++"<<endl;
              cout<<endl;
              cout<<"Masukan pilihan (1,2,3,4) dalam melakukan Queue : ";
              cin>>k;
              if (k==1) enQueue ();
              if (k==2) deQueue ();
              if (k==3) Tampilkan ();
              if (k==4) break;
       }
}
void enQueue (){
       cout<<" Masukan elemen : ";
       cin>>qu[r];
       r++;
}
void deQueue(){
       qu[f]=0;
       f++;
}
int Tampilkan (){
       int i;
       cout<<endl<<"Queue : "<<endl;
       for(i=f;i<r;++i)
              cout<<qu[i]<<",";
       cout<<endl<<"press any key...";
       return 0;
}

screenshoot program

8.1

---------------------------------------------------------------------------------------------------------------------
 --------------------------------------------------------------------------------------------------------------------- 
---------------------------------------------------------------------------------------------------------------------
 ---------------------------------------------------------------------------------------------------------------------

»»  Baca Selengkapnya

Sabtu, 23 Juni 2012

LAPORAN PRAKTIKUM QUEUE (RISKI YOGA KUSUMADYA (201101019))


LAPORAN PRAKTIKUM QUEUE
Disusn Oleh :
Riski Yoga Kusumadya
201101019

Dosen :
Yosef Murya Kusuma Ardhana, S.T

JURUSAN SISTEM INFORMASI
SEKOLAH TINGGI ILMU KOMPUTER (STIKom)
"YOS SUDARSO"
PURWOKERTO
2012


========================================================================









LISTING PROGRAM ECLIPSE


//============================================================================
// Name        : queue.cpp
// Author      :
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
using namespace std;

//#include <iostream.h>
//#include <conio.h>

int f,r,df;
int qu[50];
void enQueue(void);
void deQueue(void);
int Tampilkan(void);

int main(){
int k;
for(k=0;k<50;k++)
qu[k]=0;

while(1){
//clrscr();
cout<<endl;
cout<<"============Pilihan================"<<endl;
cout<<"1.enQueue"<<endl;
cout<<"2.deQueue"<<endl;
cout<<"3.tampilkan queue"<<endl;
cout<<"4,keluar"<<endl;
cout<<"===================================";
cout<<endl;
cout<<"masukkan pilihan(1,2,3,4) dalam melakukan Queue :";
cin>>k;

if(k==1) enQueue();
if(k==2) deQueue();
if(k==3) Tampilkan();
if(k==4) break;
}
}

void enQueue(){
cout<<"masukan elemen :";
cin>>qu[r];
r++;
}

void deQueue(){
qu[f]=0;
f++;
}

int Tampilkan(){
int i;
cout<<endl<<"Queue: "<<endl;
for(i=f;i<r;++i)
cout<<qu[i]<<",";
cout<<endl<<"presss and key . . .";

//getche();
//}
return 0;
}


OUTPUT PROGRAM








»»  Baca Selengkapnya

Jumat, 22 Juni 2012

Laporan Praktikum Modul 8 Queue (Novian Adi P) (201101029)

Laporan Praktikum Modul 8 Queue
Disusun oleh :
Novian Adi Prasetyo
201101029

Dosen
Yosef Murya Kusuma Ardhana, S.T


JURUSAN SISTEM INFORMASI
SEKOLAH TINGGI ILMU KOMPUTER (STIKOM)
“YOS SUDARSO”
PURWOKERTO
2012


                        ------------------------


Menggunakan Program Eclipse

>> Program 8.1


Listing Program :


#include <iostream>
using namespace std;
int f,r,df;
int qu[50];
void enQueue (void);
void deQueue (void) ;
int Tampilkan (void);
int main (){
       int k;
       for (k=0;k<50;k++)
              qu[k]=0;
       while (1)
       {

              cout<<endl;
              cout<<"+++++Pilihan++++++"<<endl;
              cout<<" 1. enQueue"<<endl;
              cout<<" 2. deQueue"<<endl;
              cout<<" 3. Tampilkan queue"<<endl;
              cout<<"++++++++++++++++++"<<endl;
              cout<<endl;
              cout<<"Masukan pilihan (1,2,3,4) dalam melakukan Queue : ";
              cin>>k;
              if (k==1) enQueue ();
              if (k==2) deQueue ();
              if (k==3) Tampilkan ();
              if (k==4) break;
       }
}
void enQueue (){
       cout<<" Masukan elemen : ";
       cin>>qu[r];
       r++;
}
void deQueue(){
       qu[f]=0;
       f++;
}
int Tampilkan (){
       int i;
       cout<<endl<<"Queue : "<<endl;
       for(i=f;i<r;++i)
              cout<<qu[i]<<",";
       cout<<endl<<"press any key...";
       return 0;
}



Output Program :






















Menggunakan Program Borland

>> Program 8.1


Listing Program :


#include <iostream.h>
#include <conio.h>
int f,r,df;
int qu[50];
void enQueue (void);
void deQueue (void) ;
void Tampilkan (void);
void main (){
       int k;
       for (k=0;k<50;k++)
              qu[k]=0;
       while (1)
       {
              clrscr();
              cout<<endl;
              cout<<"+++++Pilihan++++++"<<endl;
              cout<<" 1. enQueue"<<endl;
              cout<<" 2. deQueue"<<endl;
              cout<<" 3. Tampilkan queue"<<endl;
              cout<<"++++++++++++++++++"<<endl;
              cout<<endl;
              cout<<"Masukan pilihan (1,2,3,4) dalam melakukan Queue : ";
              cin>>k;
              if (k==1) enQueue ();
              if (k==2) deQueue ();
              if (k==3) Tampilkan ();
              if (k==4) break;
       }
}
void enQueue (){
       cout<<" Masukan elemen : ";
       cin>>qu[r];
       r++;
}

void deQueue(){
       qu[f]=0;
       f++;
}

void Tampilkan (){
       int i;
       cout<<endl<<"Queue : "<<endl;
       for(i=f;i<r;++i)
              cout<<qu[i]<<",";
       cout<<endl<<"press any key...";
       getche ();
}


Output Program :










»»  Baca Selengkapnya