• RSS
  • Delicious
  • Facebook
  • Twitter

Top Popular Posting

Jadwal Dakwah Aagym YM
Tugas Kuliyah BSI
Masiv Az-Zikra The News

All Posting

Category

Blogumulus by Roy Tanck and @Dangstars Distributed by Vulkanisir Online

All Visitor

Priview

free counters

wibiya widget

Blogger Widgets Blogger Widgets
close
close
#
Diberdayakan oleh Blogger.

The News

Translate Language

Share & Like yaa

Follow Blog Saya

My Facebook

Category

Tugas Kuliah BSI

Semester 1, 2, 3, 4, 5, 6 .. untuk melihat klik gambar

Buku - buku Ustadz Arifin

Mutiara Hikmah Facebook, The Miracle Of Dzikit, 4 Zikir Superdahsyat, 10 Zikir Pilihan Rekomendasi Rosulullah, dll. (Klik gambar lihat selengkapnya)

Cerita Islami

Cerita cerita Islami, Tips tips Islami, Hikmah hikmah, belajar Islam ..... (Klik gambar lihat selengkapnya)

Download Movie Animation

Download film movie kartun seperti Kungfu Panda, Madagascar, Ice Age ... ( untuk selengkapnya klik gambarnnya)

Tugas Kuliah BSI

Semester 1, 2, 3, 4, 5, 6 .. untuk melihat klik gambar

banner dakwah

Fungsi Array Dimensi 2 + if + goto





#include<conio.h>
#include<iostream.h>
#include<stdio.h>
#include<iomanip.h>
garis()
{cout<<endl;
cout<<"\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2"<<endl;
cout<<endl;}
main()
{
char lagi;
char k_lay[100][100], n_lay[100][100], j_bay[100],n_bay[100][100];
float b_pend[10], b_bul[10], b_adm[10],tobay[10];
int i,j;
a:
clrscr();
cout<<"\t\tFITNESS 'CENTER BODY FIT'"<<endl;
garis();
cout<<"\t\tMasukan Jumlah Data: ";cin>>j;
cout<<endl;
for(i=1;i<=j;i++)
{
cout<<"Data Ke - :"<<i<<endl;
cout<<"Masukan Kode Layanan [FT/SN/YG]:    ";cin>>k_lay[i];
cout<<"Masukan Jenis Bayar:    ";cin>>j_bay[i];
if (!strcmp(k_lay[i],"FT")||!strcmp(k_lay[i],"ft"))
{
strcpy(n_lay[i],"Fitnes");
if (j_bay[i]=='C'||j_bay[i]=='c')
{strcpy (n_bay[i],"Cash");
b_adm[i]=0;}
if(j_bay[i]=='K'||j_bay[i]=='k')
{strcpy (n_bay[i],"Kredit");
b_adm[i]=25000;}
{b_pend[i]=30000, b_bul[i]=30000;}
}
else if (!strcmp(k_lay[i],"SN")||!strcmp(k_lay[i],"sn"))
{
strcpy(n_lay[i],"Senam");
if (j_bay[i]=='C'||j_bay[i]=='c')
{strcpy (n_bay[i],"Cash");
b_adm[i]=0;}
if (j_bay[i]=='K'||j_bay[i]=='k')
{strcpy (n_bay[i],"Kredit");
b_adm[i]=25000;}
{b_pend[i]=30000, b_bul[i]=40000;}
}
else if (!strcmp(k_lay[i],"YG")||!strcmp(k_lay[i],"yg"))
{
strcpy(n_lay[i],"Yoga");
if (j_bay[i]=='C'||j_bay[i]=='c')
{strcpy (n_bay[i],"Cash");
b_adm[i]=0;}
if(j_bay[i]=='K'||j_bay[i]=='k')
{strcpy (n_bay[i],"Kredit");
b_adm[i]=25000;}
{b_pend[i]=30000, b_bul[i]=50000;}
}
tobay[i] = b_pend[i]+b_bul[i]+b_adm[i];
}
clrscr();
cout<<"\t\t     Bukti Pembayaran"<<endl;
cout<<"\t\tFITNESS 'CENTER BODY FIT'"<<endl;
garis();
cout<<"No.        Nama    Biaya        Biaya    Jenis    Biaya  Total"<<endl;
cout<<"                Layanan Pendaftaran  Bulanan  Bayar    Adm    Bayar"<<endl;
garis();
for(i=1;i<=j;i++)
{
cout<<setiosflags(ios::left)<<setw(7)<<i;
cout<<setiosflags(ios::left)<<setw(7)<<n_lay[i];
cout<<setprecision(10)<<"  "<<b_pend[i];
cout<<setprecision(10)<<"        "<<b_bul[i];
cout<<setprecision(10)<<"    "<<n_bay[i];
cout<<setprecision(10)<<"   "<<b_adm[i];
cout<<setprecision(10)<<"  "<<tobay[i]<<endl;
}
garis();
cout<<"Ingin Hitung Kembali [Y/T]: ";cin>>lagi;
if(lagi=='Y'||lagi=='y')
goto a;
cout<<endl;
cout<<"\t\t\2\2\2\2\2\2\2\2\2\2 Terima Kasih \2\2\2\2\2\2\2\2\2\2"<<endl;
getch();
}


Gambar Hasil Coding C++






Lihat Artikel Lainnya



Leave a Reply

Comments





======================================================================

Copyright © 2010 - 2015 | Design by @mamangsuryadi