This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Pages

Minggu, 09 Juni 2013

FUNGSI, CLASS, REKURSIF, FAKTORIAL, QUEUE, DAN STACK

#include #include #define nil NULL #define max 5 #define stack_max 5 #include using namespace std; //FAKTORIAL===================================================================// int faktorial(int f){ int rumus; if(f==0) return 1; else rumus = f*faktorial(f-1); cout<<" "<l='A'; head=data1; data2=(struct linked*)malloc(sizeof(struct linked)); data2->l='B'; data1->next=data2; data3=(struct linked*)malloc(sizeof(struct linked)); data3->l='C'; data2->next=data3; data3->next=nil; //LINKED LIST=================================================================// for(char ulang='y'; ulang=='y' || ulang=='Y';){ cout<<"================================================================================"<>pilih; system("cls"); switch(pilih){ case 1: cout<<"================================================================================"<>r; cout<<" = "<>f; cout<<" = "<>sisi; cout<<"MASUKAN PANJANG : "; cin>>panjang; cout<<"MASUKAN LEBAR : "; cin>>lebar; cout<<"LUAS PERSEGI : "<l<l<l<>kode; switch(kode){ case 1: if(antri.belakang==(max-1)) { cout<<"ANTRIAN PENUH"<>x; antri.data[antri.belakang]=x; cout<<"DATA "<<" "<>x; antri.belakang++; antri.data[antri.belakang]=x; cout<<"DATA "<<" "<0 && kode<4); return 0; break; case 6: do{ cout<>pilihan; switch(pilihan){ case 1: if(tumpuk.top==(stack_max-1)) { cout<<"TUMPUKAN PENUH"<>x; tumpuk.top++; tumpuk.data[tumpuk.top]=x; } break; case 2: if(tumpuk.top==-1) { cout<<"TUMPUKAN KOSONG"<=0; i--) { cout<<"TUMPUKAN : "<0 && pilihan<4); break; case 7: cout<<"ANDA TELAH KELUAR DARI PROGRAM"< : "; cin>>ulang; system("cls"); } }

FUNGSI, CLASS, REKURSIF, FAKTORIAL, QUEUE, DAN STACK

#include #include #define nil NULL #define max 5 #define stack_max 5 #include using namespace std; //FAKTORIAL===================================================================// int faktorial(int f){ int rumus; if(f==0) return 1; else rumus = f*faktorial(f-1); cout<<" "<l='A'; head=data1; data2=(struct linked*)malloc(sizeof(struct linked)); data2->l='B'; data1->next=data2; data3=(struct linked*)malloc(sizeof(struct linked)); data3->l='C'; data2->next=data3; data3->next=nil; //LINKED LIST=================================================================// for(char ulang='y'; ulang=='y' || ulang=='Y';){ cout<<"================================================================================"<>pilih; system("cls"); switch(pilih){ case 1: cout<<"================================================================================"<>r; cout<<" = "<>f; cout<<" = "<>sisi; cout<<"MASUKAN PANJANG : "; cin>>panjang; cout<<"MASUKAN LEBAR : "; cin>>lebar; cout<<"LUAS PERSEGI : "<l<l<l<>kode; switch(kode){ case 1: if(antri.belakang==(max-1)) { cout<<"ANTRIAN PENUH"<>x; antri.data[antri.belakang]=x; cout<<"DATA "<<" "<>x; antri.belakang++; antri.data[antri.belakang]=x; cout<<"DATA "<<" "<0 && kode<4); return 0; break; case 6: do{ cout<>pilihan; switch(pilihan){ case 1: if(tumpuk.top==(stack_max-1)) { cout<<"TUMPUKAN PENUH"<>x; tumpuk.top++; tumpuk.data[tumpuk.top]=x; } break; case 2: if(tumpuk.top==-1) { cout<<"TUMPUKAN KOSONG"<=0; i--) { cout<<"TUMPUKAN : "<0 && pilihan<4); break; case 7: cout<<"ANDA TELAH KELUAR DARI PROGRAM"< : "; cin>>ulang; system("cls"); } }