print the sequence

Ads
 

print the sequence

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

View Answers

July 29, 2012 at 5:07 PM

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


July 30, 2012 at 11:37 AM

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!");
            }
        }

July 30, 2012 at 5:02 PM

thank you so much

Ads









Related Tutorials/Questions & Answers:
print the sequence
print the sequence  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
print
print  How to print JFrame All Componant?   Please visit the following link: http://www.roseindia.net/java/example/java/swing/Print.shtml
Advertisements
Print
into the stream and, as opposed to print() method, gets you to the new line after the text
print the newline
print the newline  Why doesn?t the following code print the newline....?; print $str; ?>   Hi friends, Inside the single quotes \n (newline) is not worked as new line, just as a sequence of two characters - \ and n
ModuleNotFoundError: No module named 'sequence'
ModuleNotFoundError: No module named 'sequence'  Hi, My Python... 'sequence' How to remove the ModuleNotFoundError: No module named 'sequence... to install padas library. You can install sequence python with following
Processing Sequence of DispatcherServlet
In this section, you will get to know about the processing sequence of DispatcherServlet
ModuleNotFoundError: No module named 'print_print'
ModuleNotFoundError: No module named 'print_print'  Hi, My Python... 'print_print' How to remove the ModuleNotFoundError: No module named 'print_print' error? Thanks   Hi, In your python environment
HIbernate call for sequence - Hibernate
HIbernate call for sequence  I have created a sequence in oracle table. Now how to access this in java class through hibernate from dual table i am... the sequence using dual table. Thanks in advance
print a form of *
print a form of *   * *** ***** ******* ********* ******* ***** *** *   Post the format properly
Print Button
Print Button  i want the source code for printing details of jform.. so plz help me for source code of print button
ModuleNotFoundError: No module named 'idempotent-sequence'
ModuleNotFoundError: No module named 'idempotent-sequence'  Hi, My... named 'idempotent-sequence' How to remove the ModuleNotFoundError: No module named 'idempotent-sequence' error? Thanks   Hi
ModuleNotFoundError: No module named 'nxpy-sequence'
ModuleNotFoundError: No module named 'nxpy-sequence'  Hi, My... 'nxpy-sequence' How to remove the ModuleNotFoundError: No module named 'nxpy-sequence' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'sequence_aligner'
ModuleNotFoundError: No module named 'sequence_aligner'  Hi, My... named 'sequence_aligner' How to remove the ModuleNotFoundError: No module named 'sequence_aligner' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'sequence-builder'
ModuleNotFoundError: No module named 'sequence-builder'  Hi, My... named 'sequence-builder' How to remove the ModuleNotFoundError: No module named 'sequence-builder' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'sequence-field'
ModuleNotFoundError: No module named 'sequence-field'  Hi, My... named 'sequence-field' How to remove the ModuleNotFoundError: No module named 'sequence-field' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'sequence-folder'
ModuleNotFoundError: No module named 'sequence-folder'  Hi, My... named 'sequence-folder' How to remove the ModuleNotFoundError: No module named 'sequence-folder' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'sequence-tagging'
ModuleNotFoundError: No module named 'sequence-tagging'  Hi, My... named 'sequence-tagging' How to remove the ModuleNotFoundError: No module named 'sequence-tagging' error? Thanks   Hi, In your
print numbers
print numbers  1234 123 12 1234   1234 123 12 1234
Print the document
Print the document  I tried to print web page.I am using the below...() { var printWindow = window.open('test', 'Print Window', 'height=600,width...;Print Window</title>'); printWindow.document.write('</head>
Print the document
Print the document  I tried to print web page.I am using the below...() { var printWindow = window.open('test', 'Print Window', 'height=600,width...;Print Window</title>'); printWindow.document.write('</head>
date print
date print  how can i print the date in jsp page in the following formate month-date-year. (example. march 8 2012
date print
date print  how can i print the date in jsp page in the following formate month-date-year. (example. march 8 2012
diamond print
diamond print   print the pattern 1 2 3 4 5 6 7 8 9 10 11 12
should print in console
should print in console  
To print initials
To print initials  import java.util.Scanner; class initials { String a ; int e ; char f ; int b ; int c ; char d; Scanner sc = new Scanner(System.in); void main
Print command
Print command  Can I use System.out.println command in Struts form bean or Struts action class. I am using Struts 1.3.8 but when I write this command. It does not work. Please reply me as soon as possible. Thanks.   
ModuleNotFoundError: No module named 'fuzzy-sequence-matcher'
ModuleNotFoundError: No module named 'fuzzy-sequence-matcher'  Hi...: No module named 'fuzzy-sequence-matcher' How to remove the ModuleNotFoundError: No module named 'fuzzy-sequence-matcher' error? Thanks   Hi
ModuleNotFoundError: No module named 'galaxy-sequence-utils'
ModuleNotFoundError: No module named 'galaxy-sequence-utils'  Hi...: No module named 'galaxy-sequence-utils' How to remove the ModuleNotFoundError: No module named 'galaxy-sequence-utils' error? Thanks   Hi
ModuleNotFoundError: No module named 'keras-bed-sequence'
ModuleNotFoundError: No module named 'keras-bed-sequence'  Hi, My... named 'keras-bed-sequence' How to remove the ModuleNotFoundError: No module named 'keras-bed-sequence' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'keras-biological-gaps-sequence'
ModuleNotFoundError: No module named 'keras-biological-gaps-sequence' ...: No module named 'keras-biological-gaps-sequence' How to remove the ModuleNotFoundError: No module named 'keras-biological-gaps-sequence' error
ModuleNotFoundError: No module named 'keras-mixed-sequence'
ModuleNotFoundError: No module named 'keras-mixed-sequence'  Hi...: No module named 'keras-mixed-sequence' How to remove the ModuleNotFoundError: No module named 'keras-mixed-sequence' error? Thanks   Hi

Ads