Scrip Output Nama Hari Array Dimensi 1 :
Menggunakan Borland C++ 5.02
#include "conio.h"
#include "iostream.h"
main()
{
char hari[7][10]={"Minggu","Senin","Selasa","Rabu","Kamis","Jum'at","Sabtu",};
clrscr();
cout<<"Nama-nama Hari :"<<endl;
cout<<hari[0]<<endl<<hari[1]<<endl<<hari[2]<<endl<<hari[3]<<endl<<hari[4]<<endl<<hari[5]<<endl<<hari[6]<<endl;
getch();
}
#include "iostream.h"
main()
{
char hari[7][10]={"Minggu","Senin","Selasa","Rabu","Kamis","Jum'at","Sabtu",};
clrscr();
cout<<"Nama-nama Hari :"<<endl;
cout<<hari[0]<<endl<<hari[1]<<endl<<hari[2]<<endl<<hari[3]<<endl<<hari[4]<<endl<<hari[5]<<endl<<hari[6]<<endl;
getch();
}
0 komentar:
Posting Komentar