The-Pinguin

Reference Information About The Technology

Subscribe
Add to Technorati Favourites
Add to del.icio.us

Suported by :

Bisnis Internet | Bisnis Online | Uang dari Internet |  Duit gratis | komisi 80% CO.CC:Free Domain
Thursday, May 7, 2009

Source Code Dinamis Array Dimensi Tunggal di C++

Posted by Oki Arifin



#include <stdio.h>
#include <conio.h>

void main() {
int n; //Definisikan n sebagai jumlah array
int i; //Definisikan i sebagai Index array
int jumlah[10]; //Definisikan array dengan ukuran 10


//Proses dimulai
printf("Masukan jumlah array : ");
scanf("%i", &n); //Baca inputan untuk menentukan jumlah array
for(i = 0; i < n; i++) { //Perulangan untuk memanggil array
jumlah[i] = (i + 1) * 10; //Isi array otomatis dengan rumus
printf("Array Jumlah di Index %i adalah : %i\n", i, jumlah[i]);
}
getch(); //Tahan tampilan
}


//---Author By Amikom---//

Setelah dijalankan atau di Run & hasil Printscreennya :



Artikel Terkait:

0 comments:

Post a Comment