Question: In C++ Using nested for loops, right a program that displays a bar chart (using asterisks) for a number entered by the user. For example,

In C++ Using nested for loops, right a program that displays a bar chart (using asterisks) for a number entered by the user. For example, if the user enters 4, the bar chart looks like this:

4: ****

Do this five times total.

I have this so far;

#include using namespace std;

int main() {

int a, b, c, d, e; cout<<"enter a number"; cin>>a;

for(int i=0;i

It ends after once. I need to do it 4 times.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!