10th Aug 2017, 4:22 PM
Prateek_ _Saxena
5 Respostas
+ 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....
10th Aug 2017, 4:30 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 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(""); }
10th Aug 2017, 4:33 PM
Dev
Dev - avatar
+ 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.
10th Aug 2017, 4:51 PM
Dev
Dev - avatar
0
this is also not giving the desired output
10th Aug 2017, 4:43 PM
Prateek_ _Saxena
17th Aug 2017, 5:21 PM
Prateek_ _Saxena