#include <iostream>
#include <cstdlib>
#include <stdio.h>
usingnamespace std;
int main () {
int a;
int b;
cout<<"Choose the structure of lines(1,2,3)";
cout<<endl;
cin>>a;
for (a=1;a<6;a+1)
{
cout<<b;
}
}
So obviously you need to calculate b before line 15. For each structure you need to calculate b in a for loop. At the end of a loop iteration for variable a, you need to output a new line cout<<endl;
For structure 1, on each line b is all integers from 1 to (including) a
For structure 2, on each line b is a, multiplied with 1,2,..., up to a
For structure 3, on each line b is 3*(a-1), then add 3 for each iteration over b, from 1 to a
To make it look nice, when you output b, output an empty space after that as well cout<<b<<" ";