Selasa, 06 Desember 2011

DESKRIPSI ANTRIAN TIKET BIOSKOP

NAMA : 1. FADLILLAH MUKTI AYUDEWI (10018052)
2. PENI SUKMA NUR PRATIWI (10018034)

Kali ini kelompok kami akan menjelaskan tentang kajian kelompok kami yang berjudul "ANTRIAN TIKET BIOSKOP di XXI" yang berada di Yogyakarta. Pelayanan pembelian tiket pada bioskop disini menggunakan pelayanan datang untuk mengantri.
Disini biasanya dibuka tiga loket untuk mengantri dengan judul film yang sama. Pengunjung yang datang diawal akan memempati posisi terdepan dalam pembelian tiket, kemudian dilanjutkan dengan pengunjung yang berada dibelakangnya. Namun karena disini terdapat tiga tiket dengan judul film yang sama maka tidak selalu pengunjung yang berada dibarisan setelah pembeli tiket akan mendapatkan tiket selanjutnya. Karena yang mendapatkan tiket selanjutnya bisa saja dari antrian sebelahnya. Apalagi disini juga terdapat sistem pembelian tiket secara online yang otomatis pembelian secara online ini akan didahulukan dengan kata lain ini berarti terdapat penyisipan dalam antrian. Disini dapat disimpulkan bahwa sistem mengantri dibioskop kurang efektif karena membuang waktu untuk mengantri dan tidak selalu semua pengunjung yang mengantri akan kebagian tiket.
Demikian Deskripsi dari kelompok kami, semoga dapat diterima dan bermanfaat . . .

DESCRIPTION MOVIE TICKET QUEUE

This time our group will describe our group's study, entitled "MOVIE TICKET QUEUE in XXI" in Yogyakarta. Service purchase tickets at the cinema here using your service comes to queue.
Here is normally opened three counters to queue up with the same title of the film. Visitors who come early will memempati leading position in the purchase of tickets, followed by visitors who stands behind it. However, because here there are three tickets with the same title of the film it is not always visitors who are dibarisan after ticket buyers will get the next ticket. Because who get tickets could have been further from the next queue. Moreover, here also there is an online ticket purchasing system that automatically purchase online this will take precedence in other words this means there is insertion in the queue. Here it can be concluded that the queuing system is less effective theaters for wasting time to wait in line and not always all the visitors who will miss the ticket queue.
Thus description of our group, may be acceptable and beneficial. . .

Selasa, 21 Juni 2011

Counting the roots of quadratic equation using the function class

class in c + + function to categorize the variables, class is almost the same as the struct, the difference is the class name can be changed while in stuctr can not.



Counting the roots of quadratic equation programs use the function class

#include

#include

#include

class Persamaan{

public:

Persamaan();

void hitung();

private:

double a,b,c;

double diskriminan,x1,x2,re,im;

};

int main()

{

Persamaan x;

x.hitung();

getch();

return 0;

}

Persamaan::Persamaan(){

cout << "Persamaan Kuadrat" << endl;



cout << "a : ";



cin >> a;

cout << "b : ";



cin >> b;

cout << "c : ";



cin >> c;

}

void Persamaan::hitung (){

// hitung diskriminan

diskriminan=b*b-4*a*c;

if(diskriminan > 0)

{

x1 = (-b + sqrt(diskriminan))/(2*a);

x2 = (-b - sqrt(diskriminan))/(2*a);

cout << "Akar real : " << endl;



cout << "x1 : " << x1 << endl;



cout << "x2 : " << x2 << endl;



}

else

if(diskriminan ==0)

{

x1=-b/(2*a);

x2=x1;

cout << "Akar kembar : " << endl;



cout << "x1 : " << x1 << endl;



cout << "x2 : " << x2 << endl;



}

else //diskriminan <0



{

re= -b/(2*a);

im= sqrt(fabs(diskriminan))/(2*a);

cout << "Akar kompleks : " << endl;



cout << "x1 : " << re <<" + " << im << endl;



cout << "x2 : " << re <<" - " << im << endl;



}

}

Print the prime numbers between 1-100 by function overloading






function and operator overloading are the two most important things in C + + programming language.

mekipun unique function, this function is not much different from other types of functions.

In C + +, a function call is not only determined by the function name, but also
by type and number of actual parameters.

Facilities relating to existing functionality
other in C + + is a template function, operator function, inline function.



The following is a program of Printing prime numbers between 1-100 by function overloading





#include

#include

#include

#include


class prog

{

friend istream & operator >> ( istream &, prog & );

friend ostream & operator << ( ostream &, prog & );


public:

void id();

prog();

char nama[60];

private:

float m;

float c;

float energi;


};

void prog::id()

{

cout << "Nama Program : ";


cin.getline( nama, 60 );

cout << endl;


}

prog::prog()

{


}

ostream & operator << ( ostream & out, prog & y )


{


{

int i,j,k;

cout<<"bilangan 1-100"<

for (i=2;i<=100;i++){


for (j=2;j<=i/2;j++){


k=i%j;

if (k==0 )break;

}if(k!=0)

cout<

}

}

return out;

}

int main()

{ cout << "\t\t\t# C++ #\n\n";



char nama[90] =

{

"Cetak Bilangan Prima "

};

cout << "Nama Program :" << nama << endl;


cout << "\n";



prog a;

cout << a;


getch();

return 0;

}



Senin, 20 Juni 2011

Pointer


POINTER

Pointer is a variable that contains the memory address of a
other variables.

This address is the location of other objects (usually other variables) in
memory.

For example, if a variable contains the address of another variable, the first variable
said pointing to the second variable


Pointer operators there are two, namely:

 Operator &

& Operator is unary (requires only one operand only).

Operator & produces the address of the operandnya.

 Operator *

* Are unary operators (requires only one operand only).

Operator * value that is at an address.





pointer declaration

Tipe_data * nama_pointer;



sample program using C + + pointers

#include

#include


using namespace std;


int main(int argc, char *argv[])

{


class node {

public :

int data;

node*berikut;

};


void main(){

//langkah satu

node*baru;

baru=new node;

baru->data=5;

baru->berikut=NULL;

cout<<"Isi data node baru adalah : "<data<


//langkah dua

node*lain;

lain=new node;

lain->data=6;

lain->berikut=NULL;

cout<<"Isi data node lain adalah : "<data<


//langkah tiga : menyambung rantai

baru->berikut=lain;

cout<<"Isi data node lain dicetak dari node baru adalah :";




cout<berikut->data<


//langkah empat

node*kepala=baru;

cout<<"mencetak node pertama dari pointer kepala :";




cout<data<


cout<<"Mencetak node kedua dari pointer kepala :";




cout<berikut->data<


//langkah lima : pointer yang jalan-jalan

cout<<"Menggunakan perulangan untuk mencetak setiap data pada rantai\n";




node*jalan=kepala;

int i = 1;

while(jalan !=NULL){

cout<<"Data ke-"<"<data<


i++;

jalan=jalan->berikut;

}

//langkah enam : bukti bahwa pointer data tidak kehilangan kepala

cout<<"Mencetak node pertama dari pointer kepala : ";




cout<data<


cout<<"Mencetak node kedua dari pointer kepala : ";




cout<berikut->data<


}


system("PAUSE");

return EXIT_SUCCESS;

}


Calculator program in C + +




calculator C + +


calculator C + +







calculator was created using C + + programming language and is divided into 3 files. Next functions

are:

void kalkulator::perpangkatan (){

system("cls");

int pil;

cout<<"1.Pangkat 2\n2.Pangkat 3";


cout<<"\nMasukkan pilihan : ";


cin>>pil;

switch(pil){

case 1:

cout<<"\nmasukkan nilai x : ";


cin>>x;

cout<<"hasil perpangkatannya adalah = "<

case 2:

cout<<"\nmasukkan nilai x : ";


cin>>x;

cout<<"hasil perpangkatannya adalah = "<

}

}


void kalkulator::akar_kuadrat (){

cout<<"masukan nilai x = ";


cin>> x;

hitung=sqrt(x);

cout<<"hasilnya adalah = "<

}

void kalkulator::exponensial (){

cout<<"masukan nilai x = ";


cin>> x;

hitung=exp(x);

cout<<"hasilnya adalah = "<

}

void kalkulator::sinus (){

cout<<"Sin dari = ";


cin>> x;

float pi =3.14;

hitung = sin (x*pi/180);

cout<<"hasilnya adalah = "<

}

void kalkulator::cosinus (){

cout<<"Cos dari = ";


cin>> x;

float pi =3.14;

hitung = cos (x*pi/180);

cout<<"hasilnya adalah = "<

}

void kalkulator::tangen (){

cout<<"Tangen dari = ";


cin>> x;

float pi =3.14;

hitung = tan (x*pi/180);

cout<<"hasilnya adalah = "<

}


Minggu, 19 Juni 2011

ListOurExpend



ListOurExpend

ListOurExpend







Tugas Proyek ALGORITMA DAN PEMROGRAMAN

List Our Expend adalah program yang digunakan untuk mencatat pengeluaran sehari-hari.

TUgas Proyek ini kita buat menggunakan applikasi Android sehingga dapat diinstal atau digunakan pada mobile yang berbasic Android.

Klik Download

Rabu, 25 Mei 2011

arithmetic series (deret aritmatika)

Arithmetic series in the field of mathematics is the sequence number in which the next number of additions to the previous number by a number of specific differences. Examples are 3,5,7,9,11,13, ..... Arithmetic series can be expressed with the following formula:

a, a + b, a + 2b, a + 3b, ...

In this case the n-th quarter:

\ a_n = a + (n - 1) b,

The total of all quarters:

S_n = \ frac {n} {2} (a + a_n) = \ frac {n} {2} [2a + (n-1) b].

For example, the sum total of a quarter to quarter of an = 3 + (n-1) (5) up to a quarter-50 is

S_ {50} = \ frac {50} {2} [2 (3) + (49) (5)] = 6.275.

Algorithm deret aritmatika :
Deklarasi:
float a, b, n, un, sn: Integer
int x;

Deskripsi:
For ← (x = a, x <= un, x = x + b) a 1.0 ←, b ← 2.0; ← printf ("+% i ", x); EndFor write (Deret aritmatika)
following his program c + + :


#include
#include

using namespace std;

int main(int argc, char *argv[])
{
//deklarasi data
float a,b,n,un,sn;
int x;
//badan program
printf("Program Penghitung Deret Aritmatika");
printf("\nMasukkan:");
printf("\nSuku ke n = ",n);
scanf("%f",&n);

a = 1.0;
b = 2.0;

un = a + (n-1)*b;
sn = (0.5*n)*(a+un);

printf("\nMaka Nilai dari Un = %f\n",un);
printf("\nNilai Sn = %f\n",sn);

printf("\nSelanjutnya\n");
printf("\nUn = %f\n",un);
printf("\nDeret aritmatika untuk %f adalah :\n\n",un);

for(x=a;x<=un;x=x+b) { printf("+%i ",x); } system("PAUSE"); return EXIT_SUCCESS; }