Program Array pada C++
By Aldhen FY - April 19, 2018
1. Program C++ TUGAS 1
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int A,B;
string MONTH[4] [3] = {"JANUARI", "FEBRUARI", "MARET", "APRIL","MEI", "JUNI", "JULI",
"AGUSTUS", "SEPTEMBER", "OKTOBER", "NOVEMBER", "DESEMBER"};
cout<<" PROGRAM NAMA BULAN " <<endl;
cout<<" TAHUN 2018 " <<endl;
cout<<"================================" <<endl;
cout<<endl;
cout<<endl;
for (A=0; A<4; A++)
{
for (B=0; B<3; B++)
{
cout<<setiosflags(ios::left)<<setw(10)<<MONTH[A][B];
}
cout<<endl;
cout<<endl;
}
cout<<"==============================" <<endl;
cout<<" Fitra Aldhen " <<endl;
return 0;
}
2. Program C++ Tugas 2
#include <iostream>
#include <iomanip>
#include <conio.h>
using namespace std;
int main()
{
int A,B;
string p[4];
int j [4] [4];
cout<<"\t HASIL PENJUALAN BARANG "<<endl;
cout<<"----------------------------------------"<<endl;
for (A=1; A<=3; A++)
{
cout<<" Data Penjualan Ke-"<< A <<endl;
cout<<endl;
cout<<" Nama Barang : ";cin>>p[A];
cout<<"=================================="<<endl;
for (B=1; B<=3; B++)
{
cout<<" Data Tahun 200"<< B <<endl;
cout<<endl;
cout<<" Jumlah Penjualan : ";cin>>j[A][B];
cout<<"----------------------------------"<<endl;
}
cout<<endl<<endl;
}
cout<<"----------------------------------------------------" <<endl;
cout<<" \t HASIL PENJUALAN BARANG " <<endl;
cout<<"----------------------------------------------------" <<endl;
cout<<" No Nama Barang 2001 2002 2003 " <<endl;
cout<<"----------------------------------------------------" <<endl;
for(A=1;A<=3;A++)
{
cout<<" "<<setiosflags(ios::left)<<setw(6)<<A;
for(B=1;B<=3;B++)
{
cout<<setiosflags(ios::left)<<setw(10);
cout<<p[A];
cout<<" ";
for(B=1;B<=3;B++)
{
cout<<setiosflags(ios::left)<<setw(10);
cout<<j[A][B];
cout<<" ";
}
}
cout<<endl;
}
cout<<"----------------------------------------------------" <<endl;
getch( );
return 0;
}
2 comments
Dapatkan Penghasilan Tambahan Dengan Bermain Poker Online di www,SmsQQ,com
ReplyDeleteKeunggulan dari smsqq adalah
*Permainan 100% Fair Player vs Player - Terbukti!!!
*Proses Depo dan WD hanya 1-3 Menit Jika Bank Tidak Gangguan
*Minimal Deposit Hanya Rp 10.000
*Bonus Setiap Hari Dibagikan
*Bonus Turn Over 0,3% + 0,2%
*Bonus referral 10% + 10%
*Dilayani Customer Service yang Ramah dan Sopan 24 Jam NONSTOP
*Berkerja sama dengan 4 bank lokal antara lain : ( BCA-MANDIRI-BNI-BRI )
Jenis Permainan yang Disediakan ada 8 jenis :
Poker - BandarQ - DominoQQ - Capsa Susun - AduQ - Sakong - Bandar Poker - Bandar 66
Untuk Info Lebih Lanjut Dapat menghubungi Kami Di :
BBM: 2AD05265
WA: +855968010699
Skype: smsqqcom@gmail.com
TOTO Gourmet Tinti Titanium Price Per ounce | TiN
ReplyDeleteTOTO titanium linear compensator Gourmet Tinti Tinti Titanium Price Per ounce. Type titanium engagement rings of Tinti titanium hair Tinti Tinti TiN Type of Tinti Tinti Tinti Tinti Tinti Tinti Tinti Tinti Tinti Tinti Tinti. TiN: 40,000-85,000. Type of Tinti Tinti Tinti Tinti. Tinti: 20,000-70,000. Type of Tinti stilletto titanium hammer Tinti black titanium fallout 76 Tinti Tinti Tinti