
how can I write the code by using for loop to produce this following statement: 10,9,8,7,6,5,4,3,2,1,buzz!
please, help me

class loop { void main() { for (int i = 10; i>=1; i--) { System.out.print(" "+i+","); } System.out.println("buzz!"); } }

Here is a code that displays the required sequence: 10,9,8,7,6,5,4,3,2,1,buzz!
class ForLoop {
public static void main(String args[]) {
for (int i = 10; i>=1; i--) {
System.out.print(i+",");
}
System.out.println("buzz!");
}
}

thank you so much
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.