Pattern programme

Screenshot 2022-12-21 175842
how to do this pattern using UiPath

Hi,

It’s similar with the following topic.

image

int c=1;
int i=1;
while( i<=15)
{
    for (int j=5; j>0;j--)
    {
	    if (j<=c) 
       {
            s+=i.ToString()+" ";
     	    i++;
        }else{
        	s+="* ";
        }
	}
    s+=Environment.NewLine;
    c++;
}

note : C# code

Sequence.xaml (5.1 KB)

Regards,


how to do this programme
@Yoichi @Gokul001

Give it a try this.

image

int c=1;
int i=1;
string ts="";
while( i<=15)
{
    ts="";
    for (int j=0; j<5; j++)
    {
        if (j<c) 
       {
	       ts =i.ToString()+" "+ts;
 	        i++;
        }else{
    	    ts="* "+ts;
        }
    }
    ts+=Environment.NewLine;
    s+=ts;
    c++;
}