- 1

public class{ public static void main

Anyone know how to print the number in java comments and what is the problem

31st Mar 2021, 6:39 AM
Dhruvil Vishwakarma
Dhruvil Vishwakarma - avatar
11 odpowiedzi
0
I don't have pro, but I guess you want odd numbers(which is really easy to do). Just use a for loop with if statement, do it on your own then share the code + error + question
31st Mar 2021, 10:38 AM
Maher Al Dayekh
Maher Al Dayekh - avatar
0
Abol don't use religious stuff here it's inappropriate
31st Mar 2021, 11:38 AM
kreddyt
kreddyt - avatar
- 1
I am learning java comments and after the practice lesson problem is i want to make the code correct and i want the output off odd number 1 3 5 so what i do to get output 1 3 5
31st Mar 2021, 7:25 AM
Dhruvil Vishwakarma
Dhruvil Vishwakarma - avatar
- 1
Yeah i know that but how to write the right code?
31st Mar 2021, 7:30 AM
Dhruvil Vishwakarma
Dhruvil Vishwakarma - avatar
- 2
public class{ public static void main(String[] args) { So the program prints some odd numbers and it works perfectly the output must be something like this 1; 3 7 System.out.println("1"); System.out.println("3"); System.out.println("7"); } }
31st Mar 2021, 6:40 AM
Dhruvil Vishwakarma
Dhruvil Vishwakarma - avatar