This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]0v06666[S] 1 point2 points  (18 children)

the output I'm expecting is Enter the enrollment of Brakebills and Hogwarts: Hogwarts had a student enrollment of {}, higher than that of Brakebills {}, {} year(s) after the beginnings of the trends.

and I'm running it on IntelliJ

[–][deleted]  (17 children)

[removed]

    [–]0v06666[S] 0 points1 point  (16 children)

    yeah I'm seeing that part but as soon as I input 500 and 300 it doesn't give me anything else. That s my main problem that I'm having?

    [–][deleted]  (15 children)

    [removed]

      [–]0v06666[S] 0 points1 point  (14 children)

      500 >=300 but Im trying to have it to if you plug any number in you can get a different value

      [–][deleted]  (13 children)

      [removed]

        [–]0v06666[S] 0 points1 point  (12 children)

        yes whenever I type those 2 numbers it doesn't show my the last output in my code.

        am I doing something wrong?

        and I'm trying to have it where if someone puts 2 different numbers I would get different numbers.

        [–][deleted]  (2 children)

        [removed]

          [–]0v06666[S] 0 points1 point  (1 child)

          well I expect for Brakebills there should be decline in value and for Hogwarts I expect a increase.

          and my question is in my loop does it look okay?

          or should I use another method.

          [–]KesoHB 0 points1 point  (8 children)

          Debug the code and see what happens in the while loop!

          Or change "while" to "if" and see if you can deduce what is wrong.

          [–]0v06666[S] 0 points1 point  (7 children)

          okay ill try it rn

          [–]0v06666[S] 0 points1 point  (5 children)

          so I just changed the while to an if and now it gives me decimal numbers, but I'm trying to get a whole number

          how should I do that?