array dimensi 1

#include<iostream.h>
#include<conio.h>
void main()
{
int nilai[]={50,70,80,30,50,70};
char kar[]={‘m’,’e’,’s’,’r’,’a’,’n’};
int i;
for(i=0;i<6;i++){
cout<<“nilai[“<<i<<“]:”<<nilai[i]<<endl;
}
cout<<“\n”;
for(i=0;i<6;i++){
cout<<“karakter[“<<i<<“]:”<<kar[i]<<endl;
}
}

Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s