Algoritma 8.1

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> using namespace std // Nama : Faqih Nur Zaki // Nim : 3420230041 void garis() { puts("=================================================="); } void judul() { garis(); puts("\t Contoh Program Array"); garis(); } void pengarang() { puts("Nama \t: Faqih Nur Zaki"); puts("Email\t: faqihnz24@gmail.com"); } int main() { int i,jml; judul(); printf ("Masukan jumlah data\t:");cin>>jml; cout<<endl; int data[5]; for(i=1;i<=jml;i++) { printf ("Masukan data ke-%d\t:",i); scanf("%d",&data[i]); cout<<"\n"; } garis(); puts("Data yang anda masukan:"); garis(); for(i=1;i<=jml;i++) { printf(" Data ke-%d adalah \t:%d\n",i,data[i]); } garis(); pengarang(); return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines