Https://ide.codingblocks.com/s/126199

showing no output plz resolve

You have shared the code of some other question…please share the correct code

String a=scn.next();
String b= scn.next();

You need to use scn.next() instead of nextLine() because nextLine will take both numbers in the same string (nextLine takes space-separated strings as input) so your second string will be empty

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.

Hello , I have doubt in star patterns in java
one of them is:
int n = scn.nextInt();
int row=1;
int nst=1;
int nsp=n/2;
while(row<=n){
for(int csp=1;csp<=nsp;csp++){
System.out.print(" “);
}
for(int cst=1;cst<=nst;cst++){
System.out.print(”");
}if(row<=n/2){
nst=nst+2;
nsp–;
}else{
nst=nst-2;
nsp++;
}
for(int csp=1;csp<=nsp;csp++){
System.out.print(" “);
}if(row>=2 && row<=n-1){
System.out.print(” “);
}else{
System.out.print(”
");
}
System.out.println();
row++;
}
here I want to print a triangle which is empty from inside.

Hi, since this is regarding a different question, please ask this doubt separately so that I can view the question properly. And share your code using ide.codingblocks.com