Outputnya :
Listingnya :
#include<iostream.h>
int
nilai[10];
int
i;
void
main()
{
nilai[0] = 15;
nilai[1] = 10;
nilai[2] = 25;
nilai[3] = 50;
nilai[4] = 33;
for(i=5; i<10; i++)
{
cout<<"Masukkan
nilai ke- "<<i<<" : ";
cin>>nilai[i];
}
for(i=0; i<10; i++)
{
cout<<"Nilai
ke- "<<i<<" = "<<nilai[i];
cout<<endl;
}
}
0 komentar:
Posting Komentar