Categories

Budaya (3) Cerpen (2) Cooking (1) Curhat (29) Curug (1) Famz Story (4) fiktif (3) Film (14) Foto (36) Hiking (30) Indonesia (80) INDONESIA BAGUS (7) Info (111) Islam (3) Jepang (7) Kampus (83) Kartun (1) Kids (2) Komputer (34) Kopdar (1) Korean Fever (14) Listing Program (8) Look Alike (10) Maen (28) Multimedia (9) Musik (3) Muslimah (4) Ramadhan (1) Review (16) SAR (2) Sekedar Tulisan (49) Shout Out (6) SI (53) Situs Bersejarah (2) Team Mandalawangi (1) Trip (33) Tugas (86) Untuk Negeri (76) Video (3) Wisata (11)

Jumat, 20 April 2012

Listing Program Bahasa C Menggunakan IF

1.       #include<conio.h>
 #include<stdio.h>
 #include<iostream.h>
 int main()
{
float total_beli, diskon, total_bayar;
clrscr();
cout<<"Toko Buku Tata"<<endl;
cout<<"============"<<endl;
cout<<"Total Pembelian = Rp. ";cin>>total_beli;
cout<<endl;
if (total_beli>=100000)
diskon = 0.1 * total_beli;
else
diskon = 0;
cout<<"======================"<<endl;
cout<<"Diskon = Rp. "<<diskon<<endl;
total_bayar=total_beli-potongan;
cout<<"Total Bayar = Rp. "<<total_bayar;
getch();
return 0;
}

Tidak ada komentar:

Posting Komentar