Help in making star pattern

Hi, I am trying to printa star pattern like below:
star

It has space between two lines. I am trying to write a code but not able to print two or more consecutive stars in one line.

See my xaml file below. In the output panel, in the second row, it should print two stars ā€™ * * ā€™
but it is printing one star in one line only and second star in next line.
I am sure there must be some way to get it done and I am not getting it. Please can somebody help me.

Main.xaml (9.2 KB)

1 Like

me :thinking: this is indeed a interesting issue. I am trying it out and I look forward for someone senior to maybe give some hint here.

2 Likes

@Aishwarya28 I have attached workflow please go through it and let me know.
Pattern Demo.zip (2.8 KB)

Regards,
Mahaling Patil

2 Likes

@Aishwarya28

Iā€™m attaching my answer even though there already is one - maybe I can point you to a different direction :slight_smile:
Main (5).xaml (10.9 KB)

The problem you were facing is that you need to create a string and then concatenate the ā€œ*ā€ symbols to achieve the output you want.

3 Likes

both answers are fantastic ā€¦ now we will have to look at who the OP chooses as the winner @MahalingPatil or @FrankSchikora

2 Likes

Thank you so much.
I understood the logic now.
:slight_smile:

1 Like

I wish I could select both of them as SOLUTIONS. I have chosen the first one because I checked that first.
However, the second one by @FrankSchikora is much compact.

So, for me, both of these are the perfect solutions.

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.