• Support PF! Buy your school textbooks, materials and every day products Here!

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
56,142
6,171
Glad you figured it out.
 

Related Threads for: Boolean if exression

  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
8
Views
3K
  • Last Post
Replies
4
Views
951
  • Last Post
Replies
2
Views
609
  • Last Post
Replies
3
Views
3K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
1
Views
3K
Top