#include <iostream>
using namespace std;
void judul() {
puts ("=====================================");
puts ("\tContoh Array Dinamis 1");
puts ("=====================================");
}
int main() {
judul();
int i;
float harga[5];
harga [0] = 1000;
harga [1] = 2000;
harga [2] = 3000;
harga [3] = 4000;
harga [4] = 5000;
printf ("Variabel harga 1 adalah %.0f\n", harga [1]);
printf ("Variabel harga 3 adalah %.0f\n", harga [3]);
cout <<"\n\n";
puts ("Nilai dari selurus variabel adalah :");
for(i=0;i<5;i++)
{
printf ("Variabel harga %d adalah %.0f\n",i,harga[i]);
}
puts ("========================================");
cout << "Nama : Nagita elsa"<<endl;
cout << "Email : nagitaelsa39@gmail.com"<<endl;
return 0;
}