Anda di halaman 1dari 3

#include<iostream.

h>

#include<conio.h>

#include<stdio.h>

#include<string.h>

#include<windows.h>

#define cetak cout<<

#define input cin>>

void b(int n, char c){

for(int i=0;i<=n;i++){

cetak c;

main(){ system ("color 1d");

int kode,qty,price,st,disk,total,nominal;

char list[25];

b(45,'=');

cetak "\n\tNama\t: Fitri Wulansari";

cetak "\n\tNIM\t: 12190036";

cetak "\n\tKelas\t: 12.1E.13\n";

b(45,'=');

cetak endl<<endl<<endl;

b(10,'*');

cetak " Fie's Earrings Acc ";

b(10,'*');

cetak "\n\nList :\n";

cetak "\t1. Earrings Keropi\t: 50000\n";

cetak "\t2. Earrings Bear\t: 45000\n";

cetak "\t3. Earrings Cat\t\t: 50000\n";


cetak "\t4. Earrings Pudel\t: 75000\n";

cetak "\t5. Earrings Mickey\t: 35000\n";

b(45,'_');

cetak endl<<endl;

cetak "\t\tORDER HERE.!!!\n\n";

cetak "Pick your Fav earrings < 1 / 2 / 3 / 4 / 5 > : "; input kode;

cetak "\nHow much do u want to buy? : "; input qty;

switch(kode){

case 1: strcpy(list,"Earrings Keropi"); price=50000;break;

case 2: strcpy(list,"Earrings Bear"); price=45000;break;

case 3: strcpy(list,"Earrings Cat"); price=50000;break;

case 4: strcpy(list,"Earrings Pudel"); price=75000;break;

case 5: strcpy(list,"Earrings Mickey"); price=35000;break;

default: strcpy(list,"i'm sorry your code is wrong"); price=0;break;

clrscr(); system ("color 4b");

cetak "\t\t-- Your Order --"<<endl<<endl;

cetak "your earrings\t: "<<list<<endl;

cetak "quantity\t: "<<qty<<endl;

cetak "price\t\t: "<<price<<endl;

b(45,'_');

cetak endl;

st=qty*price;

if(qty>=5){

disk=st*10/100;

}else{

disk=0;

total=st-disk;
cetak "subtotal\t: "<<st<<endl;

cetak "discount\t: "<<disk<<endl;

b(45,'_');

cetak "\nTotal\t\t: "<<total<<endl;

cetak "amount of money\t: ";input nominal;

cetak "\nchange\t\t: "<<nominal-total;

cetak endl<<endl<<endl<<endl;

char x[]="*** thx for coming to my shop, have a nice day ***\n";

int a,b,i,n;

n=strlen(x);

for(i=0; i<n; i++){

for(a=0; a<500000;a++){

for(b=0; b<500;b++){

printf("%c",x[i]);

getch();

Anda mungkin juga menyukai