Boolean if exression

  • Thread starter Mindscrape
  • Start date
  • #1
1,860
0
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
58,373
8,449
Glad you figured it out.
 

Related Threads on Boolean if exression

  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
7
Views
1K
  • Last Post
Replies
4
Views
991
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
2
Views
708
  • Last Post
Replies
8
Views
4K
  • Last Post
Replies
1
Views
3K
  • Last Post
Replies
3
Views
3K
Top