#include <iostream>
using namespace std;
void judul() {
puts ("=======================================================");
puts (" Contoh array dimensi 1 ");
puts ("=======================================================");
}
int main() {
judul();
int i;
float harga [5];
harga [0] = 10000;
harga [1] = 20000;
harga [2] = 30000;
harga [3] = 40000;
harga [4] = 50000;
printf ("Variable harga 1 adalah %.0f \n", harga[0]);
printf ("Variable harga 2 adalah %.0f \n", harga[1]);
printf ("Variable harga 1 adalah %.0f \n", harga[2]);
printf ("Variable harga 2 adalah %.0f \n", harga[3]);
printf ("Variable harga 2 adalah %.0f \n", harga[4]);
cout<<"\n\n";
puts (" Nilai dari seluruh variable adalah: ");
for (i=0;i<5;i++)
{
printf("Variable harga %d adalah %.0f \n",i,harga[i]);
}
puts ("=======================================================");
cout<<"Nama \t: Faqih Nur Zaki\n";
cout<<"Gmail\t: faqihnz24@gmail.com";
return 0;
}