Plz check my code where i m doing wrong

import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner s=new Scanner(System.in);
int n =s.nextInt();
int nos=1;
while(n>0){
int i=1;
while(i<=n){
System.out.print(i+" ");
i++;
}

			for(int j=0;j<nos;j++){
				System.out.print("*"+" ");
			}
			nos+=2;
		
		System.out.println();
		n--;
	}
}

}

plz reply to the question

Hey @sarthaktech23, I request you to either post the doubt in the Java course discussion form or please use Python for coding (in case of Data Science).

Thanks ! :slight_smile:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.