/*0910095*/
/*DATA PENJUAlAN VIOLET CELL*/
#include
#include
#include
#include
void menu();
void input();
void cetak();
void keluar();
int dtpenjualanhp[4][7];
int tot[7];
int brs,kol;
char kode_hp,jns_hp,jwb;
void main()
{
textcolor(LIGHTBLUE);
textbackground(WHITE);
menu();
}
void menu()
{
int pil;
char ulang;
do
{
clrscr();
cout<<"++++++++++++MENU+++++++++++++++"<
switch (pil)
{
case 1 : input();
break;
case 2 : cetak();
break;
case 3 : keluar();
break;
default: break;
}
cout<
}
while (ulang=='y'||ulang=='Y');
}
void input()
{
clrscr();
gotoxy(25,1);cout<<"Data Penjualan Handphone"<
if((kode_hp=='n')||(kode_hp=='N'))
{
gotoxy(1,4);cout<<"Nama Handphone :Nokia"<
if((kode_hp=='r')||(jns_hp=='R'))
{
gotoxy(1,6);cout<<"Jenis Handphone :Comunicator"<
tot[kol]=tot[kol] + dtpenjualanhp[kol][brs];
gotoxy(1+kol*15,17);
cout<
}
}
getch();
}
void cetak()
{
clrscr();
gotoxy(25,1);cout<<"Data Penjualan Handphpne"<
gotoxy(31,2);cout<<"VIOLET CELL"<
gotoxy(1,7);cout<<"========================================================================= "<
gotoxy(1,8);cout<<"Merk HP | ITEM_1 ITEM_2 ITEM_3 ITEM_4 "<
gotoxy(1,9);cout<<"========================================================================= "<
gotoxy(1,11);cout<<"Nokia"<
gotoxy(1,12);cout<<"Samsung"<
gotoxy(1,13);cout<<"Siemens"<
gotoxy(1,14);cout<<"Motorolla"<
gotoxy(1,15);cout<<"Sony Ericson"<
gotoxy(1,16);cout<<"Philip"<
gotoxy(1,17);cout<<"Total"<
for(kol=1;kol<=4;kol++)
{
tot[kol]=0;
for(brs=1;brs<=6;brs++)
{
gotoxy(1+kol*15,10+brs*1);
cout<
tot[kol]=tot[kol] + dtpenjualanhp[kol][brs];
gotoxy(1+kol*15,17);
cout<
}
}
getch();
}
void keluar()
{
clrscr();
cout<<"EXIT";
exit(1);
}
getch();
No comments:
Post a Comment