Java Fundamentals (sixth post-course assignments) 03

Source: Internet
Author: User

1  PackageCom.xunhuan;2 3  Public classZuoYe003 {4 5 6      Public Static voidMain (string[] args) {7 8          for(inti = 1; i<=100; i++) {//Enter for Loop, (I=1 i<=100) end from 1 to 1009             if(i%3==0&&i%5==0) {//If judgment I take 3 no remainder, and I take more than 5 no remainder into if, the output is a multiple of 3 and 5TenSystem.out.println ("Filpflop"); One}Else if(i%3==0) {//does not satisfy if enter else if,i take-out 3==0, multiples of output 3 ASystem.out.println ("Filp"); -}Else if(i%5==0) {//does not satisfy if not satisfy else if, enter the next else if,i to take the remainder 5==0, output 5 multiples -System.out.println ("Folp"); the}Else{//otherwise the other number outputs I - System.out.println (i); -             } -              +         } -     } +  A}

Java Fundamentals (sixth post-course assignments) 03

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.