#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;
}
}
#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;
}
}
hasilnya:
Tidak ada komentar:
Posting Komentar