Selasa, 09 November 2010

membuat program flip flop

sintak program

#include
#include
void main()
{
int a1, a2, b1;
char pil2;
do
{
do
{
clrscr();
printf("\nProgram Flip-Flop RS \n");
printf("\nMasukkan Nilai : \n");
printf("\nNilai Masukkan R : "); scanf("%d",&a1);
printf("\nNilai Masukkan S : "); scanf("%d",&a2);
}
while (!(((a1==1)||(a1==0))&&((a2==1)||(a2==0))));
printf("\n\nMasukkan Pilihan Flip-Flop\n\t1.FF-RS\n\t2.FF-RS Berdetak \n");
fflush(stdin);
printf("Pilihan [1-2] : "); scanf ("%d",&b1);
switch (b1)
{
case 1:
printf ("\n--Flip-Flop RS--");
if (a1==0&&a2==0)
{
printf ("\nQ = 1 \nQ'= 1 \nRace Condition");
}
else if (a1==0&&a2==1)
{
printf ("\nQ = 1 \nQ'= 0 \nSet");
}
else if (a1==1&&a2==0)
{
printf ("\nQ = 0 \nQ'= 1 \nReset");
}
else
printf ("\nQ = 0 \nQ'= 1 \nMemori");
break;
case 2:
printf ("\n--Flip-Flop RS Berdetak--");
if (a1==0&&a2==0)
{
printf ("\nQ = 1/0 \nQ'= 1/0 \nMemori");
}
else if (a1==0&&a2==1)
{
printf ("\nQ = 0 \nQ'= 1 \nReset");
}
else if (a1==1&&a2==0)
{
printf ("\nQ = 1 \nQ'= 0 \nSet");
}
else
printf ("\nQ = 1 \nQ'= 1 \nRace Condition");
break;
}
getch();
clrscr();
printf("\nCoba lagi (Y/N) : ");
fflush(stdin);
scanf("%c",&pil2);
}
while (pil2=='y' || pil2=='Y');
}


output program


lirik lagu fav I


COFFEE
BY COPELAND

There's plenty of time left tonight
I promised I'd have you home before daylight
We do the best we can in a small town
Act like big city kids when the sun goes down

If it's not too late for coffee
I'll be at your place in ten
We'll hit that all night diner
And then we'll see

There's so many things I have to say
I'll stay up all night to hear about your day
We do the best we can in a small town
Act like kids in love when the sun goes down

If it's not too late for coffee
I'll be at your place in ten
We'll hit that all night diner
And then we'll see

There's a love that transcends
All that we've known of ourselves
And I'll wait for it to come
I'll wait for it to come
Well it's got to be strong to touch my heart
Through its shell
And I'll wait for it to come
I'll wait for it to come

If it's not too late for coffee
I'll be at your place in ten
We'll hit that all night diner
And then we'll see

There's a love that transcends
All that we've known of ourselves
And I'll wait for it to come
I'll wait for it to come
Well it's got to be strong to touch my heart
Through its shell
And I'll wait for it to come
I'll wait for it to come down



Minggu, 07 November 2010

dunia maya vs dunia nyata(tidak jelas)

dunia maya ternyata lebih menyenangkan dari dunia nyata yang selama ini telah saya jalani.
di kehidupan nyata ini, saya merasa seperti orang yang terbuang dan tidak di anggap.
mereka semua sama saja, tidak dapat menghargai saya sedikit saja. mungkin hanya beberapa orang, dan hanya hitungan jari, yang bisa sedikit mengertikan saya.
disini tempat ini saya merasakan lebih teracuhkan, benar-benar tidak didengar.
tidak betah, tapi tidak akan bisa berubah, seandainya waktu bisa di putar balik, saya memilih untuk tidak berada disini. lebih memilih berada di dunia yang tidak pernah terlihat wujudnya.
dunia maya tempat meluapkan semua keluh kesah ku.
dunia maya tempatku bertemu mereka yg lebih menganggap keberadaanku.
dunia maya memang tempat yg cocok untuk saya yang tidak pandai melontarkan "haii".