Basically I have to create this sequence "--***++++-----******+++++++" and this is what I have come up with so far:
I can get the sequence to read out this: 223334444555556666667777777
with this snippet of code
Code: Select all
int a, b;
for (a=2;a<8;++a)
{
for (b=1;b<a+1;++b)
{
System.out.print(a);
}
}
Code: Select all
int a, b;
for (a=2;a<8;++a)
{
for (b=1;b<a+1;++b)
{
if (a%3==0)
{
System.out.print("*");
}
else
{
System.out.print("+");
}
}
}