#include <iostream>
using namespace std;
int main()
{
int a, b, c, i;
cin >> a >> b >> c;
for ( i = 0; i < a; i++)
cout << "*" << endl;
for ( i = 0; i < b; i++)
cout << "*" << endl;
for ( i = 0; i < c; i++)
cout << "*" << endl;
}
Im aware that output is as same as:
for ( i = 0; i < a + b + c; i++ ){
cout << "*" << endl;
}
So for 2 3 1 i get:
*
*
*
*
*
*
What i want is:
*
* *
* * * //Horizontal distance between 2 shapes don't matter.
I've no idea about how to put cursor in the right place considering the printing must be done from up to down.
EDIT: I wasn't clear about the order of printing.I hope following example helps and also,if possible, printing of each column must be done by using a seperate function.
First loop:
*
*
Second loop:
*
* *
* *
Last loop:
*
* *
* * *
Printing must be done in exactly that order.Print first column,then second and goes on like this.