Need a project done?

C++ Programming Developer

Search This Blog

Program to make Histogram in C++


//Program to make Histogram in C++

#include <iostream.h>

void main()
{
int a[5] = {1,2,7,2,3};

for (int i = 1; i<5; i++)
{
cout << a[i] << "\t\t";
for (int k = 0; k<a[i]; k++)
cout << "*";

cout << endl;
}
}


1 comment:

  1. Thanks for the efforts on gathering useful content and sharing here. You can find more questions and answers related to C, C++ programming and all other programming languages Q&A in the below forum.

    C CPP programming and programming languages Q&A

    ReplyDelete

"Don't let anyone ever make you feel like you don't deserve what you want."