Modul ini membahas tentang struktur pengkondisian dan pengulangan dalam bahasa pemrograman komputer. Terdapat penjelasan mengenai struktur if, if-else, nested if, switch case, serta pengulangan menggunakan while, do-while, dan for. Modul ini juga membahas konsep array satu dimensi beserta contoh kode programnya.
[/ringkasan]
The New Wave of A/E/C Firm Websites and Digital MarketingDavid Lecours
Real-life surfer David Lecours joins Midwesterner and surf-poseur Josh Miles for a surf session about the latest in websites, and what they mean for A/E/C firm digital marketing. A few years ago, firms could get by with brochure-style websites. Today the waves are bigger, and the competition is tougher. The modern website is a business development tool that also helps you stand out from your competition.
Surf instructors David Lecours and Josh Miles will share their experiences guiding A/E/C firms to create award-winning websites. Not just pretty websites, but powerful business development tools, capable of generating leads and nurturing prospects throughout the sales tube. Learn the latest trends in digital marketing, social media, responsive design, mobile-ready websites, SEO,and more. Go back to your firm with clarity on how a modern website is the hub of a digital marketing ecosystem.
What The New Wave of Websites Means for AEC MarketersDavid Lecours
Real-life surfer David Lecours joins Midwesterner and surf-poseur Josh Miles for a highly interactive surf session about the latest in websites, and what they mean for AEC marketers. A few years ago, firms could get by with brochure-style websites. Today the waves are bigger, and the competition is tougher. How do you make the most of your ride, and stand out from the competition?
Surf instructors David and Josh will share their experiences working with dozens of AEC firms to create award-winning websites. Not just pretty websites—but powerful business development tools, capable of generating leads and nurturing prospects throughout the sales tube. Hear the latest trends in digital marketing, responsive, mobile-ready websites, SEO, and more. Leave this session ready to assemble the right internal and external teams to build a website that shreds.
Links to Sites Mentioned and More Resources:
http://www.lecoursdesign.com/wave2014/
http://design-firm.milesdesign.com/surf
The New Wave of A/E/C Firm Websites and Digital MarketingDavid Lecours
Real-life surfer David Lecours joins Midwesterner and surf-poseur Josh Miles for a surf session about the latest in websites, and what they mean for A/E/C firm digital marketing. A few years ago, firms could get by with brochure-style websites. Today the waves are bigger, and the competition is tougher. The modern website is a business development tool that also helps you stand out from your competition.
Surf instructors David Lecours and Josh Miles will share their experiences guiding A/E/C firms to create award-winning websites. Not just pretty websites, but powerful business development tools, capable of generating leads and nurturing prospects throughout the sales tube. Learn the latest trends in digital marketing, social media, responsive design, mobile-ready websites, SEO,and more. Go back to your firm with clarity on how a modern website is the hub of a digital marketing ecosystem.
What The New Wave of Websites Means for AEC MarketersDavid Lecours
Real-life surfer David Lecours joins Midwesterner and surf-poseur Josh Miles for a highly interactive surf session about the latest in websites, and what they mean for AEC marketers. A few years ago, firms could get by with brochure-style websites. Today the waves are bigger, and the competition is tougher. How do you make the most of your ride, and stand out from the competition?
Surf instructors David and Josh will share their experiences working with dozens of AEC firms to create award-winning websites. Not just pretty websites—but powerful business development tools, capable of generating leads and nurturing prospects throughout the sales tube. Hear the latest trends in digital marketing, responsive, mobile-ready websites, SEO, and more. Leave this session ready to assemble the right internal and external teams to build a website that shreds.
Links to Sites Mentioned and More Resources:
http://www.lecoursdesign.com/wave2014/
http://design-firm.milesdesign.com/surf
Deck from David Lecours and Josh Miles' session at SMPS Build Business 2015.
Since Los Angeles is the epicenter of Game Shows, your polyester-clad hosts David Lecours and Josh Miles will quiz and answer the latest trends in A/E/C firm websites, and what they mean for digital marketing for professional services firms. A few years ago, firms could get by with brochure-style websites. Today the prizes are bigger, and the competition is tougher. The modern website should be a business development tool that helps your firm generate leads while standing out from your competition.
Slide presentasi ini merupakan perbaikan dari presentasi sebelumnya tentang tipe data. Pada file ini lebih mengacu untuk penggunaan bahasa pemrograman C++
Rebranding Your A/E/C Firm: What, When, HowDavid Lecours
Your firm should be continually growing its expertise and capabilities. In the last 5-10 years, you probably added new markets and new services. You may have an entirely new strategic direction. Is the public perception of your firm keeping up, or is it stuck in the past? It could be time for a rebrand.
Rebranding is not a panacea. But done well, it can energize a tired brand. All A/E/C firm brands go through a life cycle. So it's nearly guaranteed that, at some point in your career as a firm owner or marketer, your firm will go through a rebrand. From gaining Board of Directors' approval, to budgeting, managing the process, managing expectations, and rolling it out, this can be a delicate process. Just ask Yahoo, The Gap, and UPS.
This slide deck is from a webinar designed to help you navigate the process of what, when, and how to complete a successful A/E/C firm rebranding.
Presentation made to Architects and Interior Designers at the Leaders of Design Council in Athens, Greece.
Designers that lead embrace the power of narrative. In a noisy world, you must clearly and succinctly tell your personal and studio’s story to clients, vendors, and staff. Story creates an emotional connection with potential clients that will make you memorable and influence the buying decision. When you harness the power of story in your personal interviews, web site, and case studies, you win better clients, and increase your ability to lead those clients towards success.
Expect to Learn:
Aristotle: The Architect of Persuasion on Why Story Works
Which Stories To Tell
Where To Find Your Stories
How To Structure a Compelling Story - Writing
How To Tell Better Stories - Delivery
Teaching Others to Tell Your Story
Apakah program Sekolah Alkitab Liburan ada di gereja Anda? Perlukah diprogramkan? Jika sudah ada, apa-apa saja yang perlu dipertimbangkan lagi? Pak Igrea Siswanto dari organisasi Life Kids Indonesia membagikannya untuk kita semua.
Informasi lebih lanjut: 0821-3313-3315 (MLC)
#SABDAYLSA #SABDAEvent #ylsa #yayasanlembagasabda #SABDAAlkitab #Alkitab #SABDAMLC #ministrylearningcenter #digital #sekolahAlkitabliburan #gereja #SAL
2. BAB I
PENYELEKSIAN KONDISI
1.2. STRUKTUR KONDISI “IF….”
Struktur if dibentuk dari pernyataan if dan sering digunakan untuk menyeleksi
suatu kondisi tunggal. Bila proses yang diseleksi terpenuhi atau bernilai benar,
maka pernyataan yang ada di dalam blok if akan diproses dan dikerjakan. Bentuk
umum struktur kondisi if adalah:
if(kondisi)
pernyataan;
Contoh Program 1:
/* Program struktur kondisi if untuk memeriksa suatu kondisi */
#include “stdio.h”
#include “conio.h”
void main()
{
float nilai;
printf(“Masukan nilai yang didapat : “);
scanf(“%f”, &nilai);
if(nilai > 65)
printf(“n ANDA LULUS !!!!n”);
getch();
2
3. }
Bila program tersebut dijalankan dan kita memasukan nilai 80, maka perintah
mencetak perkataan LULUS !!!! akan dilaksanakan, namun sebaliknya bila kita
memasukan sebuah nilai yang kurang dari 65 maka program akan berhenti dan
tidak dihasilkan apa-apa.
Contoh Program 2 :
/* Program contoh penerapan struktur kondisi if */
#include"stdio.h"
#include"conio.h"
void main()
{ clrscr();
int a,b,c,max;
printf("Entry bil 1 : ");scanf("%i",&a);
printf("Entry bil 2 : ");scanf("%i",&b);
printf("Entry bil 3 : ");scanf("%i",&c);
if((a>b)&&(a>c))
max=a;
if((b>a)&&(b>c))
max=b;
if((c>a)&&(c>b))
max=c;
printf("Bil terbesar : %in",max);
if(max>0)
printf("Bil tsb adalah bil positifn");
if(max<0)
3
4. printf("Bil tsb adalah bil negatif");
getch();
}
1.3. STRUKTUR KONDISI “IF......ELSE….”
Dalam struktur kondisi if.....else minimal terdapat dua pernyataan. Jika kondisi
yang diperiksa bernilai benar atau terpenuhi maka pernyataan pertama yang
dilaksanakan dan jika kondisi yang diperiksa bernilai salah maka pernyataan yang
kedua yang dilaksanakan. Bentuk umumnya adalah sebagai berikut:
if(kondisi)
pernyataan-1
else
pernyataan-2
Contoh Program 3:
#include “stdio.h”
#include “conio.h”
void main()
{
float nilai;
clrscr();
printf(“Masukan nilai yang didapat : “);
scanf(“%f”, &nilai); /* Masukan akan disimpan dalam variable nilai */
if (nilai > 65)
printf(“n LULUS !!!n”);
else
4
5. printf(“n TIDAK LULUS !!!n”);
getch();
}
Bila program tersebut dijalankan dan kita memasukan nilai 80 maka akan dicetak
perkataan “LULUS !!!” namun bila kita memasukan nilai yang kurang dari 65
maka akan tercetak perkataan “TIDAK LULUS !!!”. Hal ini berbeda dengan
struktur if dimana program akan berhenti bila kita memasukan nilai kurang dari
65.
1.4. STRUKTUR KONDISI IF DALAM IF
Perintah IF dalam IF sering disebut nested-if. Perintah ini mempunyai bentuk
umum sebagai berikut:
If (kondisi1)
If (kondisi2)
Pernyataan1;
Else
Pernyataan2;
Else
Pernyataan3;
Contoh:
Zzzzzzzzzzzzz
Zzzzzzzzzzzz
zzzzzzzzzz
1.5. STRUKTUR KONDISI IF... ELSE IF... ELSE
5
6. Pernyataan If dalam if juga mempunyai bentuk yang majemuk yang sering disebut
if bertingkat. Bentuk umumnya adalah sebagai berikut:
If (kondisi1)
Pernyataan1;
Else if (kondisi2)
Pernyataan2;
Else if (kondisi3)
Pernyataan3;
…
…
...
else
pernyataann;
Dalam hal ini jika kondisi 1 benar maka pernyataan1 yang dikerjakan dan apabila
kondisi 1 tidak benar maka kondisi2 yang akan dilihat. Dan seterusnya, jika
kondisi diatasnya tidak benar maka kondisi yang terakhir yang akan dikerjakan.
Contoh program 4:
#include <stdio.h>
main()
{
int nilai;
char huruf;
printf (“Masukkan nilai:”);scanf(“%d”,&nilai);
if (nilai>=81 && nilai<=100)
huruf=‟A‟;
else
6
7. if (nilai>=71 && nilai<=81)
huruf=‟B‟;
else
if (nilai>=61 && nilai<=71)
huruf=‟C‟;
else
if (nilai>=51 && nilai<=61)
huruf=‟D‟;
else
huruf=‟E‟;
printf (“Jadi nilai huruf yang didapat adalah: %cn”,huruf);
}
1.6. PERINTAH SWITCH
Perintah SWITCH merupakan pernyataan yang dirancang untuk
menangani pengambilan keputusan yang melibatkan sejumlah pilihan alternatif
yang diantaranya untuk menggantikan pernyataan IF bertingkat.
Bentuk umumnya adalah sebagai berikut :
SWITCH (Ekspresi)
{
Case konstanta1 :
pernyataan1;
break;
Case konstanta2 :
pernyataan2;
break;
Case konstanta3 :
7
8. Pernyataan3;
break;
...
Case Konstantan :
Pernyataan ;
Break;
Default :
Pernyataann x ;
}
Ekspresi dapat berupa ungkapan yang bernilai integer atau bertipe
karakter. Setiap konstanta1, konstanta2, konstanta3, konstanta4 sampai dengan
konstantan dapat berupa konstanta integer atau konstanta karakter.
Setiap pernyataan1, pernyataan2, pernyataan3, pernyataan4 sampai
pernytaannxdapat berupa sebuah atau beberapa pernyataan.
Pengujian pada switch akan dimulai dari konstanta1. apabila nilainya
cocok dengan ekspresi maka pernyataan satu akan dijalankan.
Perintah break mnyebabkan eksekusi diarahkan ke akhir switch kalau nilai
konstanta satu tidak sama dengan nilai ekspresi dan kemudian baru diteruskan
pengujian dengan konstanta2 dan seterusnya. Jika sampai pada pengujian akhir
tidak ada yang cocok maka default akan dijalankan.
Jika pernyataan break tidak diikutsertakan pada setiap case maka
walaupun konstantanya cocok denan ekspresi, maka setelah pernyataan pada case
tersebut dikerjakan akan dilanjutkan pada case berikutnya sampai ditemui
pernyataan break pada akhir switch.
Program 5.1. Contoh program case
/*---------------------------------------------*/
/* program : case.cpp */
/*--------------------------------------------*/
#include <stdio.h>
8
9. main ( )
{
int kdhari ;
printf (“ masukkan kode hari [1-7] : ”) ;
scanf (“%d” , &kdhari) ;
switch (kdhari)
{
case 1 :
printf (“ senin ”);
break;
case 2 :
printf (“ selasa ”);
break;
case 3 :
printf (“ rabu ”);
break;
case 4 :
printf (“ kamis ”);
break;
case 5 :
printf (“ jum‟at ”);
break;
case 6 :
printf (“ sabtu ”);
break;
case 7 :
9
10. printf (“ minggu ”);
break;
default :
Printf (“ Kode tidak ada “);
}
}
Bila program di atas dijalankan maka hasilnya adalah sebagai berikut :
Masukkan kode hari [1 – 7 ] : 1
Senin
Penjelasan :
Dari program di atas, apabila dimasukkan kode hari = 1, maka sesuai kondisi yang
diterapkan di dalam program yaitu case 1, maka pernyataan pertama yang ada
pada case satu yaitu mencetak hari senin. Apabila dimasukkan kode hari = 2,
maka pernyataan kedua yang ada pada case 2 yaitu mencetak hari Selasa yang
akan dikerjakan. Dan seterusnya tergantung dari kode hari yang dimasukkan.
BAB II
PENGULANGAN PROSES
2.1. STRUKTUR PERULANGAN “ WHILE”
Perulangan WHILE banyakdigunakanpada program yang terstruktur.
Perulanganinibanyakdigunakanbilajumlahperulangannyabelumdiketahui. Proses
10
11. perulanganakanterusberlanjutselamakondisinyabernilaibenar (true)
danakanberhentibilakondisinyabernilaisalah.
Contoh Program 1 :
/* Program Perulanganmenggunakan while */
#include “stdio.h”
#include “conio.h”
void main()
{ int x;
x = 1; /* awalvariabel */
while (x <= 10) /* Batas akhirperulangan */
{ printf(“%d BAHASA Cn”, x);
x ++; /* variabel x ditambahdengan 1 */
}
getch();
}
Jika program tersebutdijalankanmakaakanmenghasilkanhasilsebagaiberikut
1 BAHASA C
2 BAHASA C
3 BAHASA C
4 BAHASA C
5 BAHASA C
6 BAHASA C
7 BAHASA C
8 BAHASA C
11
12. 9 BAHASA C
10 BAHASA C
Padaperulangan while di atas, proses atauperintahmencetak kata-kata “BAHASA
C” akanterusdilakukanselamavariabel x masihkurangatausamadengan 10. Setiap
kali melakukanperulangan, nilaidarivariabel x akanbertambah 1.
Contoh Program 2 :
/* Program mencetakderetbilangandenganmenggunakan while */
#include"stdio.h"
#include"conio.h"
void main()
{ clrscr();
int i=1,x;
while(i<=5)
{ x=1;
while(x<=i)
{ printf("%i",x);
x=x+1;
}
printf("n");
i=i+1;
}
getch();
}
12
13. Contoh program 3 :
#include <iostream.h>
#include <stdio.h>
void main()
{
int i = 0;
while (i != 99) {
printf ("n MasukkanSebuahBilangan : "); scanf("%d",&i);
printf ("n Bilangan Anda adalah= %d",i);
}
}
2.2. STRUKTUR PERULANGAN “DO.....WHILE…”
Padadasarnyastrukturperulangan do....while samasajadenganstruktur while,
hanyasajapada proses perulangandengan while, seleksiberada di while yang
letaknya di atassementarapadaperulangan do....while, seleksi while berada di
bawahbatasperulangan. Jadidenganmenggunakanstruktur do…while sekurang-
kurangnyaakanterjadisatu kali perulangan.
Contoh Program 4 :
#include “stdio.h”
13
14. #include “conio.h”
void main()
{ int x;
x = 1;
do
{ printf(“%d BAHASA Cn”, x);
x ++;
}
while(x <= 10);
getch();
}
2.3. STRUKTUR PERULANGAN “FOR”
Strukturperulangan for biasadigunakanuntukmengulangsuatu proses yang
telahdiketahuijumlahperulangannya. Dari segipenulisannya, strukturperulangan
for
tampaknyalebihefisienkarenasusunannyalebihsimpeldansederhana.Bentukumump
erulangan for adalahsebagaiberikut:
for(inisialisasi; syarat; penambahan)
pernyataan;
Keterangan :
Inisialisasi:pernyataanuntukmenyatakankeadaanawaldarivariabelkontrol.
syarat:ekspresirelasi yang menyatakankondisiuntukkeluardariperulangan.
penambahan:pengaturperubahannilaivariabelkontrol.
14
15. Contoh Program 5 :
/* Program perulanganmenggunakan for */
#include “stdio.h”
#include “conio.h”
void main()
{ int x;
for(x = 1; x<= 10; x++)
{ printf(“%d BAHASA Cn”, x); }
getch();
}
Contoh Program 6 :
/* Mencari total dan rata-rata sejumlahbilanganmenggunakan for */
#include"stdio.h"
#include"conio.h"
void main()
{ clrscr();
floatr,i,x,t=0;
int y;
for(y=1; y<=3; y++)
for(i=0; i<=2; i++)
{ printf("Entry bilangan %i : ",y);scanf("%f",&x);
t=t+x;
y=y+1;
}
printf("n Total : %.2f",t);
15
16. r=t/i;
printf("n Rata rata : %.2f",r);
getch();
}
2.4. PERNYATAAN BREAK
2.5. PERNYATAAN CONTINUE
2.6. NESTED LOOP
BAB III
ARRAY
3.1. ARRAY DIMENSI SATU
Setiapelemen array dapatdiaksesmelaluiindeks.Indeks array secara default dimulai
dari 0.
Deklarasi Array
Bentukumum :
Tipe_arraynama_array[ukuran];
Contoh :
Nilai[0] Nilai[1] Nilai[2] Nilai[3] Nilai[4]
intNilai[5];
70 80 82 60 75
Contoh Program 1 :
16
17. /*Program untukmenginputnilaimahasiswakedalam array satudimensi*/
#include <stdio.h>
#include <conio.h>
void main()
{
int index, nilai[10];
clrscr();
/* input nilaimahasiswa */
printf(“Input nilai 10 mahasiswa : “);
for(index=0; index < 10; index++)
{ printf(“Mahasiswa %i : “, index+1);
scanf(“%i”, &nilai[index]);
}
/* tampilkan nilai mahasiswa */
printf(“Nilai mahasiswa yang telah diinput”);
for(index=0; index < 10; index++)
{ printf(“%5.0i”, nilai[index]);
}
getch();
}
CATATAN :
String jugasebenarnyamerupakan array yang bertipekarakter.Jumlahelemen array
menyatakanjumlah string.
Contoh Program 2 :
/*Program u/ menentukan jurusan & jenjang mahasiswa berdasarkan NIM*/
#include <stdio.h>
17
18. #include <conio.h>
#include <string.h>
void main()
{
char jurusan[25], jenjang[10], nim[10], nama[20];
printf(“Masukkan nama Anda : “); gets(nama);
printf(“Masukkan NIM Anda : “); gets(nim);
/***** cari jurusan *****/
switch(nim[2])
{ case „1‟ : strcpy(jurusan, “Teknik Informatika”);
break;
case „2‟ : strcpy(jurusan, “SistemInformasi”);
break;
case „3‟ : strcpy(jurusan, “TeknikIndustri”);
break;
case „4‟ : strcpy(jurusan, “TeknikElektro”);
break;
default :printf(“Andasalahmemasukkan NIM. Cobaperiksalagi !”);
break;
}
/***** carijenjang *****/
if(nim[4] == „5‟)
{ strcpy(jenjang, “Strata-1”);
}
else
{ if(nim[4] == „3‟)
18
19. { strcpy(jenjang,”Diploma-3”);
}
else
printf(“ANdasalahmemasukkan NIM. Coba periksa lagi !”);
}
/***** tampilkan data mahasiswa *****/
printf(“ << Data MahasiswaUniversitasMercuBuana>>“);
printf(“n Nama : %s”, nama);
printf(“n NIM : %s”, nim);
printf(“n Jurusan : %s”, jurusan);
printf(“n Jenjang : %s”, jenjang);
getch();
}
Contoh Program 3 :
/*Program u/ menentukan RATA-RATA*/
#include <stdio.h>
#define MAKS 5
main()
{
int i;
float total = 0, rata;
floatnilai_tes[MAKS]; /* deklarasi array */
for(i=0; i < MAKS; i++) /* pemasukan data nilai_tes */
{
printf("Nilaiteske-%d : ", i+1);
19
20. scanf("%f", &nilai_tes[i]);
/* menghitungjumlahseluruhnilai */
total = total + nilai_tes[i];
}
rata = total / MAKS; /* hitungnilai rata-rata */
/* cetaknilai rata-rata */
printf("nNilai rata-rata = %gn", rata);
}
3.2. ARRAY DIMENSI DUA
Array dua dimensi merupakan array yang terdiri dari m buah baris dan n buah
kolom.
Bentuknya dapat berupa matriks atau tabel.
Deklarasiarray :
Tipe_arraynama_array[baris][kolom];
Contoh :
IntX[3][4];
X[0][0] X[0][1] X[0][2] X[0][3]
X[1][0] X[1][1] X[1][2] X[1][3]
X[2][0] X[2][1] X[2][2] X[2][3]
Cara mengaksesarray :
Untukmengakses array, misalnyakitainginmengisielemen array baris 2 kolom 3
dengan 10 makaperintahnyaadalahsbb:
X[1][2] = 10;
Untuk mengisi dan menampilkan isi elemen array ada dua cara yaitu :
Row Major Order (secarabaris per baris)
Column Major Order (secarakolom per kolom)
20
21. Contoh Program 3 :
/* Program penjumlahanmatriksduadimensi */
#include "stdio.h"
#include "conio.h"
void main()
{
int A[3][4], B[3][4], X[3][4], Y[3][4], C[3][4], i, j;
clrscr();
/******* Masukkanmatriks A *******/
for(i=0;i<3;i++)
{ for(j=0;j<4;j++)
{ printf("input data matrik A[%i][%i] : ",i+1,j+1);
fflush(stdin);scanf("%i",&A[i][j]);
}
}
/******** Masukkanmatriks B ********/
for(i=0;i<3;i++)
{ for(j=0;j<4;j++)
{ printf("input data matrik B[%i][%i] : ",i+1,j+1);
fflush(stdin);scanf("%i",&B[i][j]);
}
}
/******** Proses penjumlahanmatriks A dan B ********/
for(i=0;i<3;i++)
{ for(j=0;j<4;j++)
{ X[i][j]=A[i][j]+B[i][j];
21
22. }
}
/******** Cetak isi matriks A ********/
printf("n matrik An");
for(i=0;i<3;i++)
{ for(j=0;j<4;j++)
printf("%6i",A[i][j]);
printf("n");
}
printf("n");
/******** Cetakisimatriks B *******/
printf("n matrik Bn");
for(i=0;i<3;i++)
{ for(j=0;j<4;j++)
printf("%6i",B[i][j]);printf("n");
}
printf("n");
/******** Cetakhasilpenjumlahanmatriks A dan B *******/
printf("n matrikpenjumlahan A+Bn");
for(i=0;i<3;i++)
{ for(j=0;j<4;j++)
printf("%6i",X[i][j]);printf("n");
}
printf("nn");
getch();
}
22
23. Contoh aplikasi Array untuk menghitung invers suatu matriks dengan ukuran m x
n dengan metode Gauss-Jordan :
Contoh Program 4:
/* MENGHITUNG INVERS MATRIKS DENGAN METODE GAUSS-
JORDAN */
#include <stdio.h>
#include <conio.h>
void main()
{
float p[20], a[20][20], t;
int m, i, j, k, x;
clrscr();
printf("nMasukkanukuranmatriks : n");
scanf("%d", &m);
printf("nMasukkan nilai elemen matriks yang akan diinvers”);
printf(“nsecara baris per barisn");
/* Membacamatriksasli */
for(i=1; i<=m; i++)
{ printf("n");
for(j=1; j<=m; j++)
{ printf("A(%d,%d)= ",i, j);
scanf("%f", &a[i][j]);
}
}
/* MencetakMatriksasli */
printf("nMatriksasli : ");
23
25. printf(" n");
}
getch();
}
3.3. ARRAY MULTI-DIMENSI
Array multi-dimensi merupakan array yang mempunyai ukuran lebih dari dua.
Bentuk pendeklarasian array sama saja dengan array dimensi satu maupun array
dimensi dua. Bentuk umumnya yaitu :
tipe_arraynama_array[ukuran1][ukuran2]…[ukuranN];
Contoh :
float X[2][4][3];
X[0][0][0] X[0][0][1] X[0][0][2] X[1][0][0] X[1][0][1] X[1][0][2]
X[0][1][0] X[0][1][1] X[0][1][2] X[1][1][0] X[1][1][1] X[1][1][2]
X[0][2][0] X[0][2][1] X[0][2][2] X[1][2][0] X[1][2][1] X[1][2][2]
X[0][3][0] X[0][3][1] X[0][3][2] X[1][3][0] X[1][3][1] X[1][3][2]
25