Senin, 04 Maret 2013

0 Kontrol Flip-Flop with C

#include <stdio.h>
#include <conio.h>
#include <dos.h>

main()
{ char option;
 char opt='y';
 while(opt='y')
 {  clrscr();
 gotoxy(15,1);printf("MENU CONTROLLING\n");
 gotoxy(15,2);printf("==================\n");
 gotoxy(7,4);printf("1: Lampuq On     A: Lampu1    Off\n");
 gotoxy(7,7);printf("         Pilihan Anda [ ? ]             ");
 gotoxy(31,7);scanf("%c",&pilih);
 switch(option)
 {  case '1': outport(0x378,1);break;
  case 'A':outport(0x378,0);break;
  default:outport(0x378,0);gotoxy(7,17);
  printf("Tidak ada opsi dalam Menu... ");break;  }
 gotoxy(7,18);printf("      Kembali ke Menu, Enter..!!! ");
 gotoxy(31,31);scanf("%c",&jawab);
 }
}

0 Comments

Bagaimana Pendapat Anda ?