Pages

Selasa, 31 Mei 2016

Coding Toko Butik dengan Borland C++

#include"stdio.h"
#include"conio.h"
#include"iostream.h"
#include"iomanip.h"
judul()
{
cout<<"\t\t\tPENYEWAAN PAKAIAN ADAT NASIONAL"<<endl;
cout<<"\t\t\t     CHONIO BOUTIQUE           "<<endl;
cout<<"\t\t\t*******************************"<<endl;
}

garis()
{
cout<<"*****************************************************************"<<endl;
}

long int ttl(int jml,int hrg)
{
return(jml*hrg);
}

main()
{
char nama[30],more,lama;
long total;
long ub,uk;
int a,s;

struct
{
char kode_baju[5],kode_uku,nama_paket[30];
int jumlah;
long harga,subtotal;
}baju[15];

awal:
clrscr();
total=0;
judul();
cout<<"NAMA PENYEWA      : ";gets(nama);
cout<<"INPUT LAMA SEWA   : ";cin>>lama;
cout<<"INPUT JUMLAH DATA : ";cin>>s;
cout<<endl;
for(a=1;a<=s;a++)
{
cout<<"DATA KE-"<<a<<endl;
cout<<"INPUT KODE PAKET BAJU [JB/JT/SB] : ";cin>>baju[a].kode_baju;
cout<<"INPUT KODE UKURAN BAJU [S/M/L]   : ";cin>>baju[a].kode_uku;
cout<<"JUMLAH SEWA : ";cin>>baju[a].jumlah;
if(!strcmp(baju[a].kode_baju,"JB")||!strcmp(baju[a].kode_baju,"jb"))
{
strcpy(baju[a].nama_paket,"JAWA BARAT");
if(baju[a].kode_uku=='S'||baju[a].kode_uku=='s')
{baju[a].harga=200000;}
else if(baju[a].kode_uku=='M'||baju[a].kode_uku=='m')
{baju[a].harga=230000;}
else if(baju[a].kode_uku=='L'||baju[a].kode_uku=='l')
{baju[a].harga=250000;}
}
else if(!strcmp(baju[a].kode_baju,"JT")||!strcmp(baju[a].kode_baju,"jt"))
{
strcpy(baju[a].nama_paket,"JAWA TENGAH");
if(baju[a].kode_uku=='S'||baju[a].kode_uku=='s')
{baju[a].harga=230000;}
else if(baju[a].kode_uku=='M'||baju[a].kode_uku=='m')
{baju[a].harga=255000;}
else if(baju[a].kode_uku=='L'||baju[a].kode_uku=='l')
{baju[a].harga=270000;}
}
else if(strcmp(baju[a].kode_baju,"SB")||strcmp(baju[a].kode_baju,"sb"))
{
strcpy(baju[a].nama_paket,"SUMATERA BARAT");
if(baju[a].kode_uku=='S'||baju[a].kode_uku=='s')
{baju[a].harga=240000;}
else if(baju[a].kode_uku=='M'||baju[a].kode_uku=='m')
{baju[a].harga=265000;}
else if(baju[a].kode_uku=='L'||baju[a].kode_uku=='l')
{baju[a].harga=300000;}
}
cout<<endl;
}
cout<<endl<<endl;
clrscr();
judul();
cout<<"\nNAMA PENYEWA : ";cout<<nama<<endl;
cout<<"DATA BAJU YANG DISEWA"<<endl;
garis();
cout<<"No.    Nama Paket         Harga        Jumlah Sewa       Subtotal"<<endl;
garis();
for(a=1;a<=s;a++)
{
gotoxy(2,wherey());cout<<a<<".";
gotoxy(8,wherey());cout<<baju[a].nama_paket;
gotoxy(27,wherey());cout<<baju[a].harga;
gotoxy(45,wherey());cout<<baju[a].jumlah;
baju[a].subtotal=ttl(baju[a].jumlah,baju[a].harga);
gotoxy(58,wherey());cout<<baju[a].subtotal<<endl;
total=total+baju[a].subtotal;
}
garis();
cout<<"\t\t\t\tTotal Bayar  : ";
gotoxy(55,wherey());cout<<"Rp "<<total<<endl;
cout<<"\t\t\t\tUang Bayar   : ";
gotoxy(55,wherey());cout<<"Rp ";cin>>ub;
uk=ub-total;
cout<<"\t\t\t\tUang Kembali : ";
gotoxy(55,wherey());cout<<"Rp "<<uk;
cout<<endl;
gotoxy(15,wherey());cout<<"TERIMA KASIH"<<endl;
cout<<"INPUT DATA LAGI [Y/T] : ";cin>>more;
if(more=='Y'||more=='y')
goto awal;
else
goto akhir;
getch();
akhir:
}

Hasil running seperti gambar diatas

Coding HTML untuk Biodata dengan XAMPP

Sobat kali ini saya mau berbagi info coding membuat biodata.html yang kece, berikut codingannya ;

<html>
<head></head>
<title></title>
<body bgcolor="navy">
<audio controls autoplay>
<source src="Dawin - Dessert – (Official Lyrics Video).mp3" type="audio/mpeg">
</audio>
<br>
<table border=2 width=80% height=200 align="center" bordercolor="turquoise">
<tr>
<td colspan=2 align="center"><font color="white" size=14 face="comic sans ms"><Marquee><i>"Biodataku"</i></Marquee></font></td>
</tr>
<tr>
<td><font color="orchid" size=8 face="comic sans ms">Nama:</font></td>
<td><font color="green" size=8 face="comic sans ms">Aprillia Tesalonika</font></td>
</tr>
<tr>
<td><font color="violet" size=8 face="comic sans ms">Alamat:</font></td>
<td><font color="yellowgreen" size=8 face="comic sans ms">Jl.Kapuk Pulo</font></td>
</tr>
<tr>
<td><font color="plum" size=8 face="comic sans ms">Hobi:</font></td>
<td><font color="paleterquise" size=8 face="comic sans ms">Baca Komik Detective Conan</font></td>
</tr>
<tr>
<td><font color="thistle" size=8 face="comic sans ms">Email:</font></td>
<td><font color="chartreuse" size=8 face="comic sans ms">apriliatesa18@yahoo.co.id</font></td>
</tr>
<tr>
<td><font color="seashell" size=8 face="comic sans ms">Fotoku:</font></td>
<td><img src="Conan.jpg" width="350" height="340"></img></td>
</tr>
</table>
</body>
</html>

_______________________________
Simpan dengan nama Biodata.html

Kalau sobat sdh selesai ketik codingan tersebut di notepad jangan lupa aktifkan XAMPP kalian terlebih dahulu sebelum buka web di browser kalian dan format untuk membuka hasil web kalian di browser adalah localhost/nama folder di htdocs/Biodata.html

NB : htdocs ada di C:\xampp\htdocs