C++ Programming Blog

 
 
 

Image

 #include<iostream.h>
 #include<conio.h>


 main()
    {
       clrscr();

       cout<<\"\\n i)- First Histogram :\"<<endl;

       for(int count_1=1;count_1<=10;count_1++)
      {
         for(int count_2=1;count_2<=count_1;count_2++)
        cout<<\"*\";

         cout<<endl;
      }

       cout<<\"\\n ii)- Second Histogram :\"<<endl;

       for(int count_3=1;count_3<=10;count_3++)
      {
         for(int count_4=10;count_4>=count_3;count_4--)
        cout<<\"*\";

         cout<<endl;
      }

       getch();
       return 0;
    }

 
 
Didn't find what you were looking for? Find more on Program to print a histogram