Algoritma7.2

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> using namespace std; void garis() { puts("============================================================="); } void judul() { garis(); puts("\tContoh Array Dimensi 2"); garis(); } void ttd(){ garis(); puts("Nama : Nur Izzati Istiqlal"); puts("Email : nurizzatisql@gmail.com"); } int main() { judul(); int i; char hari[7][10] = { "Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu" }; printf("Hari ke 1 adalah %s\n",hari[1]); printf("Hari ke 3 adalah %s",hari[3]); for(i=1;i<=3;i++) { cout<<endl; } puts("Nilai dari seluruh variable hari adalah:"); for(i=0;i<7;i++) { printf("Variable hari %d adalah %s\n",i,hari[i]); } ttd(); cout<<"Nama = Nur Izzati Istiqlal"<<endl; cout<<"NIM = 1620230004"<<endl; return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines