Giter Site home page Giter Site logo

Comments (2)

redocmath avatar redocmath commented on June 12, 2024

Checked error: there are critical errors on the connections between if family statements (if, elif, else)

Example case

  • code
int n = toint(in())

for i in range(1, n+1, 1) {
    out(tostring(i)+": ")
    if (i % 15 == 0) {
        out("fizzbuzz")
    }
    else {
        if (i % 3 == 0) {
            out("fizz")
        } 
        elif (i % 5 == 0) {
            out("buzz")
        }
        else {
            out("none")
        }
    }
    out("\n")
}
  • in
30
  • output
1: none
2: none
3: fizz
4: none
5: buzz
6: fizz
7: none
8: none
9: fizz
10: buzz
11: none
12: fizz
13: none
14: none
15: fizzbuzz
16: none
17: none
18: fizz
19: none
20: buzz
21: fizz
22: none
23: none
24: fizz
25: buzz
26: none
27: fizz
28: none
29: none
30: fizzbuzz
  • reported issue: the flow is strange

from wops.

redocmath avatar redocmath commented on June 12, 2024

Fixed. 🚀

from wops.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.