Boolean if exression

  • Thread starter Mindscrape
  • Start date
  • #1
Mindscrape
1,861
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:

Answers and Replies

  • #2
berkeman
Mentor
63,633
14,749
Glad you figured it out.
 

Suggested for: Boolean if exression

  • Last Post
Replies
1
Views
172
  • Last Post
Replies
5
Views
633
  • Last Post
Replies
2
Views
574
  • Last Post
Replies
15
Views
828
  • Last Post
Replies
5
Views
666
  • Last Post
Replies
1
Views
658
  • Last Post
Replies
3
Views
2K
Replies
5
Views
1K
Replies
3
Views
906
  • Last Post
Replies
2
Views
1K
Top