Menu Close

Histogram Menggunakan Array 1 Dimensi

Terakhir diperbaharui pada

Script ini akan menampilkan histogram dengan pattern ‘*’. Teknik yang digunakan menerapkan statemen for i yang diimplementasikan ke dalam Array 1 Dimensi (1D).

loading...
loading...

//program histogram
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int n[7] = {10,3,15,14,17,5,3};
int i,j;
cout<<"Mencetak Pola Histogram"<<endl;
for (i=0; i<7; i++)
{
cout<<" "<<i<<" "<<n[i];
gotoxy (11, i+2);
for (j=1; j<=n[i];j++ )
cout<<"*";
cout<<"\n";
}
}

DMCA.com Protection Status
Artikel ini dilidungi oleh DMCA Takedown Services & Website Content Protection. Dilarang Copy-Paste.
Yang mau ngajakin ngopi silahkan klik
Jangan lupa like kami di Facebook untuk update informasi terbaru:

Artikel ini berada dalam kategori C++

Artikel Terkait:

18 Komentar

  1. Endulpignip

    Just want to say what a great blog you got here!
    I’ve been around for quite a lot of time, but finally decided to show my appreciation of your work!

    Thumbs up, and keep it going!

    Cheers
    Christian, iwspo.net

  2. Endulpignip

    Just want to say what a great blog you got here!
    I’ve been around for quite a lot of time, but finally decided to show my appreciation of your work!

    Thumbs up, and keep it going!

    Cheers
    Christian,Earn Free Vouchers / Cash

  3. Pingback:Corporate Event Management Company in Hyderabad

  4. Pingback:?????????

  5. Pingback:Festivales

  6. Pingback:how to cheat asphalt 8

  7. Pingback:lowongan kerja bumn oktober 2018/2019

  8. Pingback:Arena Hijau

  9. Pingback:converted garage

  10. Pingback:klik gan

  11. Pingback:bandar taruhan

  12. Pingback:nursing test banks

  13. Pingback:look what i found

  14. Pingback:Christ Gospel Church Cult

  15. Pingback:Lake Texoma Fishing Guide

  16. Pingback:sertifikasi guru aceh 2018

  17. Pingback:how to make money with a iphone

  18. Pingback:pokemon go hack

Mari Berdiskusi

Chat via WA
1
Hai,
Semoga harimu menyenangkan...
Powered by