News for hackers. Stuff that matters.
Re:America’s Need for Skilled Immigrants Isn’t Going Away by Metricon on Wednesday October 24, 2018 @06:39PM (#18297079)
Technically, this would be more efficient:

  #include <iostream>
  using namespace std;
  
  int main() {
    for (int i = 1; i <= 100; i++) {
       bool t = (i % 3 == 0);
       bool f = (i % 5 == 0);
  
       if (!t && !f) { cout << i << endl; continue; }
       if (t) cout << "Fizz";
       if (f) cout << "Buzz";
       cout << endl;
    }
  }
But most interviewers are interested in the basic logic of the process.

There are no comments on this comment yet.