Rabu, 27 April 2011

Tugas 6 c++

#include<conio.h>
#include<stdio.h>
#include<iostream.h>
main()
{
char kodebrg[5],namabrg[30];
int jml_beli;
float harga,total_harga,total_bayar,diskon;
cout<<" TOKO SEMUA ADA "<<endl;
cout<<" Jl.Padasuka No.74 Tangerang Tenggara "<<endl;
cout<<"-----------------------------------------------------"<<endl;
cout<<"Kode barang : ";cin>>kodebrg;
cout<<"Nama barang : ";gets(namabrg);
cout<<"Jumlah beli : ";cin>>jml_beli;
cout<<"Harga : Rp.";cin>>harga;
cout<<"-------------------------------------------------------"<<endl;
total_harga=harga*jml_beli;
cout<<"Total harga : Rp."<<total_harga<<endl;
if (total_harga > 150000)
diskon=total_harga*20/100;
else
diskon=0;
cout<<"Diskon : Rp."<<diskon<<endl;
total_bayar=total_harga-diskon;
cout<<"Total bayar : Rp."<<total_bayar<<endl;
cout<<endl;
cout<<" T E R I M A K A S I H "<<endl;
getch();
download
}

Selasa, 26 April 2011

CV.Cyber Technician Computer

Terima jasa perakitan komputer,Service,Install,dll
Contac Person:
azie:Hp: 085693005322
ery:Hp: 02195227586

Sabtu, 23 April 2011

tugas 1

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

main()
{
char nama[50];
int keaktifan , tugas , ujian ,hasilkeaktifan , hasiltugas , hasilujian, hasil;
clrscr();
cout<<"\tPROGRAM NILAI AKHIR";
cout<<endl;
cout<<"^^^-------------------------------^^^"<<endl;
cout<<endl;
cout<<"\t\(^o^)/ siswa yang bernama: ";gets(nama);
cout<<"\t\(^o^)/ dengan nilai persentasi yang dihasilkan: \(^o^)/"<<endl;
cout<<endl;
cout<<"^^^-------------------------------^^^"<<endl;
cout<<"\tnilai keaktifan        :";cin>>keaktifan;
cout<<"\tnilai tugas        :";cin>>tugas;
cout<<"\tnilai ujian        :";cin>>ujian;
hasilkeaktifan = keaktifan * 20/100;
hasiltugas = tugas * 30/100;
hasilujian = ujian * 50/100;
hasil = hasilkeaktifan + hasiltugas + hasilujian;
cout<<endl;
cout<<"^^^-------------------------------^^^"<<endl;
cout<<endl;
cout<<"\tnilai keaktifan*20%    :"<<hasilkeaktifan<<endl;
cout<<"\tnilai tugas*30%        :"<<hasiltugas<<endl;
cout<<"\tnilai ujian*50%        :"<<hasilujian<<endl;
cout<<endl;
cout<<"^^^-------------------------------^^^"<<endl;
cout<<endl;
cout<<"\tjadi siswa yang bernama:"<<nama<<endl;
cout<<"\tmemperoleh nilai akhir sebesar :"<<hasil<<endl;
cout<<endl;
cout<<"^^^-------------------------------^^^"<<endl;
getch();
}
lansung aja download listing di atas disini

tugas 2 (AND)

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

main()
{
char nama[15], kelas[20], nim[10];
float A, B, C, K, L, M, D, E, F, G, H;
clrscr();
cout<<"\tBIODATA SAYA\n";
cout<<"NIM        : "    ;cin>>nim;
cout<<"Nama        : "    ;gets(nama);
cout<<"Kelas        : "    ;cin>>kelas;
cout<<endl;
cout<<"(^o^)/-----------------------(^o^)/"<<endl;
cout<<endl;
cout<<"Nilai A = ";cin>>A;
cout<<"Nilai B = ";cin>>B;
cout<<"Nilai C = ";cin>>C;
cout<<"Nilai K = ";cin>>K;
cout<<"Nilai L = ";cin>>L;
cout<<"Nilai M = ";cin>>M;
cout<<endl;
cout<<"(^o^)/-----------------------(^o^)/"<<endl;
//proses
D = (4+2>A&&B-2>3+2||B+2<=6+2);
E = K+5<M||M<L&&2*M-L>0;
F = L+5<M||C*K<L&&2*K-L>0;
G = A*4<=3*M+B;
H = K+10>A&&L-2>4*C;

cout<<endl;
cout<<"program ekspresi AND/OR"<<endl<<endl;
cout<<"hasil dari D = (4+2>A&&B-2>3+2||B+2<=6+2) adalah " <<D<<endl;
cout<<"hasil dari E = K+5<M||M<L&&2*M-L>0 adalah " <<E<<endl;
cout<<"hasil dari F = L+5<M||C*K<L&&2*K-L>0 adalah " <<F<<endl;
cout<<"hasil dari G = A*4<=3*M+B adalah " <<G<<endl;
cout<<"hasil dari H = K+10>A&&L-2>4*C adalah " <<H<<endl;
cout<<endl<<endl;
cout<<"(^o^)/-----------------------(^o^)/"<<endl;
cout<<endl;
getch();
}
download disini

tugas 2 (NOT)

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

main()
{
char nama[15], kelas[20], nim[10];
float A, B, C, K, L, M, D, E, F, G, H;
clrscr();
cout<<"\tBIODATA SAYA\n";
cout<<"NIM        :"    ;cin>>nim;
cout<<"Nama        :"    ;gets(nama);
cout<<"Kelas        :"    ;cin>>kelas;
cout<<endl;
cout<<"(^o^)/-----------------------(^o^)/"<<endl;
cout<<endl;
cout<<"\tNilai A =";cin>>A;
cout<<"\tNilai B =";cin>>B;
cout<<"\tNilai C =";cin>>C;
cout<<"\tNilai K =";cin>>K;
cout<<"\tNilai L =";cin>>L;
cout<<"\tNilai M =";cin>>M;
cout<<endl;
cout<<"(^o^)/-----------------------(^o^)/"<<endl;
//proses
D = !(4+2>A&&B-2>3+2||B+2<=6+2);
E = !(K+5<M||M<L&&2*M-L>0);
F = !(L+5<M||C*K<L&&2*K-L>0);
G = !(A*4<=3*M+B);
H = !(K+10>A&&L-2>4*C);

cout<<endl;
cout<<"\tprogram ekspresi NOT"<<endl<<endl;
cout<<"hasil dari D = (4+2>A&&B-2>3+2||B+2<=6+2) adalah" <<D<<endl;
cout<<"hasil dari E = K+5<M||M<L&&2*M-L>0 adalah" <<E<<endl;
cout<<"hasil dari F = L+5<M||C*K<L&&2*K-L>0 adalah" <<F<<endl;
cout<<"hasil dari G = A*4<=3*M+B adalah" <<G<<endl;
cout<<"hasil dari H = K+10>A&&L-2>4*C adalah" <<H<<endl;
cout<<endl<<endl;
cout<<"(^o^)/-----------------------(^o^)/"<<endl;
cout<<endl;
getch();
}
sudah berhasil di run,kalau mau soal dia atas silahkan download disini

tugas 3

#include <iostream.h>
#include <conio.h>
#include <stdio.h>
main()
{
char nama[50];
int nilai1,nilai2,nilai3,ratarata;
cout<<"\t\tPROGRAM HITUNG NILAI RATA-RATA"<<endl;
cout<<"(^o^)/---------------------------------------------------------(^o^)/"<<endl;
cout<<endl;
cout<<"Nama                = ";gets(nama);
cout<<"nilai pertandingan I        = " ;cin>>nilai1;
cout<<"nilai pertandingan II        = " ;cin>>nilai2;
cout<<"nilai pertandingan III        = " ;cin>>nilai3;

ratarata= (nilai1+nilai2+nilai3)/3;

                  cout<<endl;
                  cout<<"siswa yang bernama "<<nama;
                  cout<<endl;
                  cout<<"memperoleh nilai rata-rata " <<ratarata;
                  cout<<endl;
                  cout<<"dan menjadi juara ke-";
                  if(ratarata>80)
                  {
                  cout<<"I";
                  }
                  else
                  if(ratarata>75)
                  {
                  cout<<"II";
                  }
                  else
                  if(ratarata>65)
                  {
                  cout<<"III";
                  }
                  else
                  cout<<"TIDAK JUARA";
                  cout<<" dari hasil perlombaan yang diikutinya"<<endl;
                  getch();
                  }
disini kalau anda ingin mendownload listing di atas

tugas 4

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

main ()
{
char nama [50],pendidikan[7];
long gol,jamker,lembur1,lembur2, tunjab, tunpen, gapok=300000, total;

cout<<"\tPROGRAM HITUNG GAJI KARYAWAN";
cout<<"\n============================================";
cout<<"\n\nNama Karyawan                  = ";gets(nama);
cout<<"Golongan Jabatan [1/2/3]          = ";cin>>gol;
cout<<"Pendidikan [ SMA/D1/D3/S1 ]             = ";cin>>pendidikan;
cout<<"Jumlah jam kerja               = ";cin>>jamker;

if(gol==1)
{tunjab=0.05*gapok;}
else
if(gol==2)
{tunjab=0.1*gapok;}
else
{tunjab=0.15*gapok;}
if(strcmp(pendidikan,"SMA")==0||strcmp(pendidikan,"sma")==0)
{tunpen=0.025*gapok;}
else
if(strcmp(pendidikan,"D1")==0||strcmp(pendidikan,"d1")==0)
{tunpen=0.05*gapok;}
else
if(strcmp(pendidikan,"D3")==0)
{tunpen=0.3*gapok;}

lembur1=jamker-8;
if(lembur1>0)
{lembur2=lembur1*3500;}
else
{lembur2=0;}

total=gapok+tunjab+tunpen+lembur2;

cout<<endl;
cout<<"Karyawan yang bernama = "<<nama<<endl;
cout<<"Honor yang diterima "<<endl;
cout<<"    Tunjangan jabatan         Rp."<<tunjab<<endl;
cout<<"    Tunjangan pendidikan          Rp."<<tunpen<<endl;
cout<<"    Honor Lembur            Rp."<<lembur2<<endl;
cout<<"    Total gaji             _______________+"<<endl;
cout<<"                    Rp."<<total<<endl;
getche();
}
klik disini untuk download