1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Boolean if exression

  1. Feb 6, 2007 #1
    I am trying to make a table that will output a value every ten years. Basically, I am incrementing the year by 1 in a while loop, and I want it so every time year=10, 20, 30... that it will output a value. I have:

    if (year%10 == 0) {
    ... code

    For some reason the compiler has trouble compiling this.

    *Nevermind, I had a typo and forgot the second =.
    Last edited: Feb 6, 2007
  2. jcsd
  3. Feb 7, 2007 #2


    User Avatar

    Staff: Mentor

    Glad you figured it out.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook