C++ :: Histogram menggunakan Array 1 Dimensi

Home » Komputer » Pemrograman » C++ » C++ :: Histogram menggunakan Array 1 Dimensi
C++ 18 Comments

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

//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”;
}
}

18 thoughts on - C++ :: Histogram menggunakan Array 1 Dimensi

  • 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

  • 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

  • … [Trackback]

    […] Read More on|Read More|Find More Infos here|Here you can find 34117 more Infos|Infos to that Topic: blog.loksado.com/c-histogram-menggunakan-array-1-dimensi […]

  • … [Trackback]

    […] Find More here|Find More|Read More Infos here|There you can find 77137 more Infos|Informations on that Topic: blog.loksado.com/c-histogram-menggunakan-array-1-dimensi […]

  • … [Trackback]

    […] Find More here|Find More|Find More Infos here|There you will find 45695 additional Infos|Informations to that Topic: blog.loksado.com/c-histogram-menggunakan-array-1-dimensi […]

  • … [Trackback]

    […] Read More here|Read More|Find More Informations here|There you will find 63833 more Informations|Infos on that Topic: blog.loksado.com/c-histogram-menggunakan-array-1-dimensi […]

  • … [Trackback]

    […] Find More here|Find More|Read More Infos here|There you can find 64159 more Infos|Informations on that Topic: blog.loksado.com/c-histogram-menggunakan-array-1-dimensi […]

  • … [Trackback]

    […] Read More here|Read More|Find More Informations here|There you can find 24216 more Informations|Infos to that Topic: blog.loksado.com/c-histogram-menggunakan-array-1-dimensi […]

  • … [Trackback]

    […] Find More on|Find More|Find More Informations here|Here you will find 39652 additional Informations|Infos to that Topic: blog.loksado.com/c-histogram-menggunakan-array-1-dimensi […]

  • … [Trackback]

    […] Find More here|Find More|Find More Informations here|Here you will find 36883 additional Informations|Infos to that Topic: blog.loksado.com/c-histogram-menggunakan-array-1-dimensi […]

  • … [Trackback]

    […] Find More on|Find More|Find More Infos here|There you will find 88291 more Infos|Informations on that Topic: blog.loksado.com/c-histogram-menggunakan-array-1-dimensi […]

  • … [Trackback]

    […] Find More here|Find More|Find More Informations here|Here you will find 80267 more Informations|Infos on that Topic: blog.loksado.com/c-histogram-menggunakan-array-1-dimensi […]

LEAVE A COMMENT