0
my programme arenot runnin
5 Answers
+ 19
public class Program
{
public static void main(String[] args) {
for(int i=9;i<=1;i=i-2)
{
for(int j=1;j<=i;j=j+2) {
System.out.print(j);
}
System.out.println("");
}
}
}
//this runs although it shows no output because your code is wrong....
+ 8
// Maybe you're trying to print this :
for(int i=9;i>=1;i=i-2)
{
for(int j=1;j<=i;j=j+2) {
System.out.print(j);
}
System.out.println("");
}
+ 8
public class Program
{
public static void main(String[] args) {
for(int i=9;i>=1;i=i-2) {
for(int j=1;j<=i;j=j+2) {
System.out.print(j);
}
System.out.println("");
}
}
}
// this should work.
0
this is also not giving the desired output
0
this is also not runnin
https://code.sololearn.com/cIavvbaDk8D8/?ref=app