Computer Science, asked by Anonymous, 1 year ago

print the pattern
1
123
12345

using q basic (for while/do while)​

Answers

Answered by nain31
1
 \underline{\huge { \mathfrak \color{green}{ELLO!} }}

 \underline { \mathfrak \color{red}{CODING ! }}

import Java. up. *.;

class p

{

public static void main(String args[])throws Exception

{

int i, j,n=1;

for(i=1;i<=3;i++)

{

for(j=1;j<=n;j++)

{

System. out. print(j);

}

n=n+2;

System. out. println();

}

}

}

 \underline{\huge { \mathfrak \color{green}{OUTPUT} }}

1

123

12345

 \underline{\huge { \mathfrak \color{red}{HOPE \: IT \: HELPS}}}
Similar questions