Get paid to share your links!

Program Kasir Sederhana

Wednesday, March 7, 2012

#include
#include
#include

void main()
{
int tot_beli, tot_byr, disc=0;
char nama_kasir [30];
char nama_pembeli [30];

cout<<" TOKO HALAL MAKMUR JAYA\n"; cout<<"Dapatkan diskon 20% untuk setiap\n"; cout<<"total pembelian Rp. 50.000 keatas\n"; cout<<"---------------------------------\n"; cout<<"Nama Kasir : "; gets(nama_kasir); cout<<"Nama Pembeli : "; gets(nama_pembeli); cout<<"---------------------------------\n"; cout<<"Total Pembelian : Rp. "; cin>>tot_beli;
if (tot_beli>=50000)
disc=0.2*tot_beli;

cout<<"Potongan : Rp. "< cout<<"------------------------------------ -\n";
tot_byr=tot_beli-disc;
cout<<"Total Pembayaran : Rp. "< getch();
}

Bilangan Fibonacci

#include
#include
#include

void main()
{
unsigned int a[100], x, b, n, c;

cout<<"BILANGAN FIBONACCI\n"; cout<<"==================\n\n"; cout<<"------------------------------------------------------------------\n"; cout<<"ket:\n"; cout<<"\tBilangan fibonacci adalah deret bilangan yang menjumlahkan\n"; cout<<"dua buah bilangan sebelumnya untuk menentukan deret selanjutnya\n"; cout<<"\n"; cout<<"dengan rumus : a[n] = a[n-1] + [n-2]\n"; cout<<"------------------------------------------------------------------\n"; cout<<"\n"; cout<<"Deret bilangan ke berapa yang ingin anda ketahui : ke-";cin>>x;

c=x-1;

if (c>=2)
{
a[0]=1;
a[1]=1;

for (n=2; n<=c; n++)
{
a[n]=a[n-1]+a[n-2];
}
}
else if (c==1)
{
a[1]=1;
}
else
{
a[0]=1;
}

cout<<"\n";
cout<<"Bilangan Fibonacci pada deret ke-"< cout<<"\n";
cout<<"Hasil Deret :\n";
cout<<"^^^^^^^^^^^\n";

for (b=0; b<=c; b++)
{
a[0]=1;
a[1]=1;

for (n=2; n<=c; n++)
{
a[n]=a[n-1]+a[n-2];
}
cout< }
getch();
}

Tabel Kebenaran

#include
#include
#include
#include

void main()
{
int x, p[4], q[4] , a[4], b[4], c[4], d[4] ;

p[0]=1;
p[1]=1;
p[2]=0;
p[3]=0;

q[0]=1;
q[1]=0;
q[2]=1;
q[3]=0;

cout<<"TABEL KEBENARAN\n";
cout<<"===============\n\n";
cout<<"-----------------------------------------------------------\n";
cout<<"P"< cout<<"P AND Q"< cout<<"-----------------------------------------------------------\n";
for (x=0; x<=3; x++)
{
a[x]=p[x]||q[x];
b[x]=p[x]&&q[x];
c[x]=!p[x];
d[x]=p[x]^q[x];

cout< cout< cout< cout< cout< cout<
cout< }
cout<
getche();
}

Penghitung Huruf/karakter

#include
#include
#include

int main()
{
char kata[100];
int a,kalimat=0,voc=0,lain;
cout<<"==============================\n";
cout<<"= Program Menghitung Huruf =\n";
cout<<"==============================\n";
cout<<"\n";
cout<<"Tuliskan kalimat !\n\n";
gets(kata);

for (a=0; kata[a]!='\0';a++)
{
kalimat++;
}

for (a=0; kata[a]!='\0';a++)
{
if(kata[a]=='a'||kata[a]=='e'||kata[a]=='i'||kata[a]=='o'||kata[a]=='u')
{
voc++;
}
}

lain=kalimat-voc;

cout<<"\n";
cout<<"Total Semua Karakter yang ada : "< cout<<"Total Huruf Vokal (a,i,u,e,o) : "< cout<<"Total Huruf nonVokal dan karakter lainya : "<
getch();
}

Pengertian Dioda

Tuesday, March 6, 2012


Dioda adalah piranti semikonduktor dengan bahan tipe-n yang menyediakan elektron-elektron bebas dan bahan tipe-p yang disatukan (P-N junction). Dioda merupakan suatu piranti dua elektroda dengan arah arus yang tertentu, dapat juga dikatakan dioda bekerja sebagai penghantar bila tegangan listrik diberikan dalam arah tertentu tetapi dioda akan bekerja sebagai isolator bila tegangan yang diberikan dalam arah berlawanan dari pergerakan elektron pembentuknya.

Kristal pn sebagai penyusun dioda akan bekerja jika arus didalamnya hanya dapat mengalir dalam satu arah dan tidak sebaliknya. Hubungan ini disebut dengan rangkaian prategangan maju (forward bias). Pada dioda, kita mengenal potensial barrier yaitu beda potensial pada persambungan. Beda potensial ini menjadi cukup besar untuk menghalangi proses penyebaran difusi selanjutnya dari elektron-elektron bebas. Pada suhu ruangan potensial barrier bekerja sekitar 0,7 Volt untuk Silikon dan 0,3 Volt untuk Germanium. https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjby_8KRgGCjvkId7neX-nHQnmNwh8B_APpoCFQKWBE_vpOzCGA-gjcF2BHAqsFErJUEaZ5NNfuGtXcvO-PEOoSdrwcJHIexPJVxy-I_jPY0dy5AyiWgj_gbtzQG8c-daR6h5tpZyHclNoa/s320/1.JPG

Gambar 2.4 Kurva Dioda

Gambar 2.4 merupakan kurva karakteristik dioda pada pra tegangan maju (forward) dan pra tegangan balik (reverse). Dari gambar karakteristik tersebut dapat dianalisa bahwa sebuah dioda akan mengalirkan arus setelah tegangan luar mengatasi potensial barrier, maka arus maju akan menjadi besar. Pada kurva dengan karakteristik balik saat tegangan yang diberikan sama dengan nol, maka tidak ada arus yang mengalir jika tegangan dinaikkan maka arus akan sangat kecil. Saat arus maju terlalu besar maka dioda akan rusak karena disipasi daya terlalu besar. Jika pada arah balik tegangan yang terlalu tinggi akan menimbulkan kedadalan (breakdown) listrik pada dioda
. https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpEcCg-TvU2wzfutib_7-R-K40k1iMgLHGYgLLDlpvmWmjSj_eJdNi65H35127Xp0raAiO-EwCfQVKDwIT-8edtsMkG82_MArVAa8T1kDCHhsBrjQiA6hVZHWI-1DR2UMhqMFuSjADI-F7/s320/2.JPG

Gambar 2.5 Kurva Dioda Ideal

Cerita Lucu

Tuesday, February 21, 2012

PINOKIO
The Legendary Woodboy

Once upon time there lived the king and the queen. The king is kind and wise. The king and the queen didn’t have son or daughter. So they asked to the professor X to create a male robot and adopted the robot to be their son. robot 1 named Pinokio. Professor X not only created Pinokio but also created another male robot. Robot 2 named Astroboy. He was also adopted by professor to be his son. He was only friend of Pinokio. Pinokio didn’t have any friend except Astroboy, because he is a robot not human. No one wanted to be his friend.  Pinokio and Astroboy wanted to be human. But they realized that was just only a dream. However, Pinokio could live in peacefully environment.       
One day when Pinokio and Astroboy were playing in the forest near from their house, they were seeing an old man looking for woods. Then they stopped playing and helped an old man to look for woods. The old man was very happy because there were two children who helped him. When Astroboy was picking a wood, the branch fell down against his back. Suddenly he couldn’t move. All of his body part couldn’t be moved. Then old man gave suggestion to Pinokio to go to the cave in the middle of that forest. Pinokio was ordered by old man to get a bottle inside the cave and bring it to old man.
Pinokio was very frightened when he arrived at cave. The cave looked like scary. It is dark. He knew that he had to enter inside. There were many obstacles, but he could pass the obstacles well. Then he found the bottle and brought it out from the cave. When Pinokio came back, he just saw Astroboy. Astroboy said that old man suddenly disappeared. Then Pinokio opened the bottle. Suddenly blue genie came out from the bottle. It made Pinokio and Astroboy surprised. Actually, the genie is old man who was helped by them.” give me your request!” said genie.
“I want to construct friendship with everybody.” said Pinokio. Then he turned in to the woodboy. All of his body became wood. He had long nose. Then Astroboy said his request, “I want to be a human.” And Astroboy turned in to human. Pinokio confused why the genie turned him in to woodboy. And the genie said that he would explain it later and ordered Pinokio to take the bottle with him. Then Pinokio and Astroboy went home.
After that his live changed. Pinokio became well-known woodboy who never lie, because if he lied, his nose would become longer. Pinokio had got trust from his father to substitute him to be a king. In the substitution ritual, the genie came out from the bottle which always he brings. Of course that made crowd surprised. And genie said, “Anything your weakness, if you apply honesty, you will get trust, with trust you can construct friendship easily, that’s why I turn you in to woodboy.” After that Pinokio became king woodboy after ever.   

Followers

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. Blog - All Rights Reserved
Template Created by Creating Website Inspired by Sportapolis Shape5.com
Proudly powered by Blogger