Algoritma 8.1

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> using namespace std; void garis() { puts("=========================================="); } void judul() { garis(); puts("Contoh Program Array"); garis(); } void author() { puts("Nama\t: Dimas Malikusshaleh"); puts("Email\t: dimas.paul212@gmail.com"); } int main() { int jml, i; judul(); printf("Masukkan Jumlah Data: "); cin >> jml; cout << endl; int data[5]; for (i = 1; i <= jml; i++) { printf("Masukkan Data Ke-%d: ", i); scanf("%d", &data[i]); cout << endl; } garis(); puts("Data Yang Anda Masukkan"); garis(); for (i = 1; i <= jml; i++) { printf("Data Ke-%d adalah\t: %d\n", i, data[i]); } garis(); author(); return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines