diff --git a/bar_graph.cpp b/bar_graph.cpp new file mode 100644 index 0000000..4837d97 --- /dev/null +++ b/bar_graph.cpp @@ -0,0 +1,65 @@ +#include + +using namespace std; + +void plot(int ar[], int n) +{ + int highest=0; + for(int i=0; ihighest) + highest=ar[i]; + } + cout< 0;c--) + { + if(highest<10) + { + cout<<"\t\t"; + cout<<" "<=highest) + cout<<"|##|\t"; + } + + highest--; + cout<0;k--) + cout<<"________"; + cout<>n; + int ar[n]; + + for(int i=0; i>ar[i]; + + } + plot(ar,n); +}