I'm trying to make a program where the user inputs the "shape" by adding characters such as *,/ etc. and then print it on the screen the amount of times the user inputs. The program works fine but in the end it says program not responding. Any help with that?
#include <iostream>
using namespace std;
int main()
{
int a,h=1 ,b=0, x=7;
char test[a][100];
cout<<"Input how many lines ";
cin>>a;
cout<<"Input how many repeats ";
cin>>b;
for(int j=1; j<=a; j++)
{
cin>>test[j];
}
while(h<=b)
{
for(int c=1; c<=a; c++)
{
cout<<test[c]<<"\n";
}
h++;
}
return 0;
}