CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2012
    Posts
    1

    Post output of the program

    can any tell me the how to write the java code for below requirement

    requirement: print numbers from 1 to 100 and
    in the out put print , if (number %3==0) print "fizz" and if (number %5==0) print "buzz" and if (number %3*5==0) print "fizzbuzz" .

    the out put is like below:
    1
    2
    fizz
    4
    buzz
    .
    .
    .
    14
    fizzbuzz
    ........i want out put like this can any one tell me how to write the code for above requirement
    thanks
    mahesh

  2. #2
    Join Date
    May 2006
    Location
    UK
    Posts
    4,473

    Re: output of the program

    We won't do your homework for you but if you show some effort and ask a specific question we will help.
    Posting code? Use code tags like this: [code]...Your code here...[/code]
    Click here for examples of Java Code

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured