This is default featured post 1 title
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
This is default featured post 2 title
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
This is default featured post 3 title
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
This is default featured post 4 title
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
This is default featured post 5 title
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
Juni 08, 2011
Tugas 9
Mei 26, 2011
tugas 8 (2)
Mei 25, 2011
tugas 8 (3)
Buatlah program header di bawah ini , kemudian simpan dengan nama : hitnilai.h , pada folder kerja anda folder include
/*hitnilai.h
*/
#define awal {
#define akhir }
#define mulai() main()
#define cetak cout
#define tampil cprintf
#define masuk scanf
#define hapus() clrscr()
#define jika if
#define warna textcolor
#define tahan getche()
Simpan pada direktori C:\BC5\INCLUDE\..... , selanjutnya compile file hitnilai.h .
Buatlah program di bawah ini , kemudian gunakan header yang sudah anda buat ..
download di sinii
tugas 7
April 24, 2011
Mempercepat Browsing
April 23, 2011
tugas 6
#include<stdio.h>
class jual
{
public:
char kode_hp[5],*merk_hp;
int jml_beli;
float harga,total;
};
main()
{
char nm_kasir[25],nm_pembeli[25];
int i,j;
float totbay;
jual hp[10];
clrscr();
cout<<" CEMPEDAK CELL "<<endl;
cout<<" Jl. Cempedak no.378 "<<endl;
cout<<" Telp. (021) 7901074 "<<endl;
cout<<"-------------------------------------------------------------"<<endl;
cout<<"Nama kasir : ";gets(nm_kasir);
cout<<"Nama pembeli : ";gets(nm_pembeli);
cout<<"Masukkan jumlah data : ";cin>>j;
cout<<endl;
for(i=1;i<=j;i++)
{
cout<<"Data ke- "<<i<<endl;
cout<<"Kode Hp [NK66,SE80,NK73,SM73] :";cin>>hp[i].kode_hp;
if(strcmpi(hp[i].kode_hp,"NK66")==0)
{hp[i].merk_hp="Nokia 6600";
hp[i].harga=1200000;}
else
if(strcmpi(hp[i].kode_hp,"SE80")==0)
{hp[i].merk_hp="Sony Ericson W80";
hp[i].harga=1500000;}
else
if(strcmpi(hp[i].kode_hp,"NK73")==0)
{hp[i].merk_hp="Nokia N73";
hp[i].harga=1700000;}
else
if(strcmpi(hp[i].kode_hp,"SM73")==0)
{hp[i].merk_hp="Siemens C73";
hp[i].harga=1700000;}
cout<<"Merk Hp :"<<hp[i].merk_hp<<endl;
cout<<"Harga :Rp."<<setprecision(12)<<hp[i].harga<<endl;
cout<<"Jumlah beli :";cin>>hp[i].jml_beli;
hp[i].total=hp[i].jml_beli*hp[i].harga;
cout<<endl;
}
clrscr();
cout<<" COUNTER HANDPHONE CEMPEDAK CELL "<<endl;
cout<<" Laporan Penjualan Handphone "<<endl;
cout<<" Jl. Cempedak no. 378 Telp.(021)7901074 "<<endl;
cout<<"-------------------------------------------------------------"<<endl;
cout<<"No. Kode Merk Harga Jumlah Total "<<endl;
cout<<" HP HP Beli "<<endl;
cout<<"-------------------------------------------------------------"<<endl;
for(i=1;i<=j;i++)
{
cout<<setiosflags(ios::left)<<setw(5)<<i;
cout<<setiosflags(ios::left)<<setw(9)<<hp[i].kode_hp;
cout<<setiosflags(ios::left)<<setw(10)<<hp[i].merk_hp;
cout<<setiosflags(ios::right)<<setw(10)<<hp[i].harga;
cout<<setiosflags(ios::right)<<setw(10)<<hp[i].jml_beli;
cout<<setiosflags(ios::right)<<setw(10)<<hp[i].total<<endl;
totbay=totbay+hp[i].total;
}
cout<<"-------------------------------------------------------------"<<endl;
cout<<"Total Bayar :"<<setprecision(12)<<totbay<<endl;
getch();
}
akhirnya kelar juga klo ada yang mw coba di RUN,silahkan dulu download kerjaan di atas
tugas c++ 5 array
#include <stdio.h>
#include <conio.h>
#include <iomanip.h>
#include <string.h>
//Nama: Alfan//Kelas: 12.1a.03//NIM: 12111305//No. Absen: 45//
main()
{
int x ,a ,ulangi;
char jenis[6] = {'D','d','P','p','S','s'} ,*ket[6];
long bapot[6], jumhar[6] = {0}, hasat[6] = {2500 ,2000 ,1500};
long jumbar[6]= {0}, pajak[6], totba[6];
pesan:
clrscr();
cout<<"\tGEROBAK FRIED CHICKEN\n";
cout<<"\t---------------------\n";
cout<<"\t Kode Jenis Harga\n";
cout<<"\t---------------------\n";
cout<<"\t [D] Dada Rp. 2500\n";
cout<<"\t [P] Paha Rp. 2000\n";
cout<<"\t [S] Sayap Rp. 1500\n\n";
cout<<"\t---------------------\n\n";
cout<<"\tBanyak Jenis : ";cin>>x;
jumbar[x] = 0;
if (x <= 0)
{
cout<<"\n\t\tBanyak Jenis Tidak Boleh Null";
goto akhir;
}
else
{
for(a = 1 ; a <= x; ++a)
{
cout<<"\tJenis Ke - "<<a;
cout<<"\n\tJenis Potong [D/P/S] : ";cin>>jenis[a];
cout<<"\tBanyak Potongan : ";cin>>bapot[a];
cout<<"\t------------------------\n";
if (jenis[a] == 'D' || jenis[a] == 'd')
{
ket[a] = "Dada ";
hasat[a] = 2500;
}
else if (jenis[a] == 'P' || jenis[a] == 'p')
{
ket[a] = "Paha ";
hasat[a] = 2000;
}
else if (jenis[a] == 'S' || jenis[a] == 's')
{
ket[a] = "Sayap";
hasat[a] = 1500;
}
else
{
cout<<"\nAnda Salah Masukan Kode Jenis Potongan.";
hasat[a] = 0;
}
jumhar[a] = hasat[a] * bapot[a];
jumbar [x] = jumbar[x] + hasat[a] * bapot[a];
if (jumbar[x] == 0)
{
pajak[x] = 0;
totba[x] = 0;
}
else
{
pajak[x] = jumbar[x] * 0.1;
totba[x] = jumbar[x] - pajak[x];
}
}
}
cotong | Satuan | Beli | Harga\n";
cout<<"================================================\n";
for (a = 1; a <= x; ++a)
{
cout<<" "<<a<<" | "<<ket[a]<<" | "<<hasat[a];
cout<<" | "<<bapot[a]<<" | Rp. "<<jumhar[a]<<endl;
}
cout<<"------------------------------------------------\n";
cout<<"\t\t\tJumlah Bayar Rp. "<<jumbar[x]<<endl;
cout<<"\t\t\tPajak 10% Rp. "<<pajak[x]<<endl;
cout<<"\t\t\tTotal Bayar Rp. "<<totba[x];
cout<<"\n\n\tAnda Ingin Memesan Lagi? [Y/T] = ";
ulangi = getche();
if (ulangi == 'Y' || ulangi == 'y')
goto pesan;
else
cout<<"\n\n\t\tTerima Kasih";
akhir:
getch();
}
ahhhhh puyeng lah . . yang mw ambil diri disini