fork download
  1. #include <iostream>
  2.  
  3. int main(){
  4. for(int i=1; i <= 100; ++i){
  5. bool foo = !(i % 3), bar = !(i % 7);
  6. bool num = !(foo || bar);
  7. foo && std::cout << "foo";
  8. bar && std::cout << "bar";
  9. num && std::cout << i;
  10. std::cout << "\n";
  11. }
  12. }
Success #stdin #stdout 0s 2828KB
stdin
Standard input is empty
stdout
1
2
foo
4
5
foo
bar
8
foo
10
11
foo
13
bar
foo
16
17
foo
19
20
foobar
22
23
foo
25
26
foo
bar
29
foo
31
32
foo
34
bar
foo
37
38
foo
40
41
foobar
43
44
foo
46
47
foo
bar
50
foo
52
53
foo
55
bar
foo
58
59
foo
61
62
foobar
64
65
foo
67
68
foo
bar
71
foo
73
74
foo
76
bar
foo
79
80
foo
82
83
foobar
85
86
foo
88
89
foo
bar
92
foo
94
95
foo
97
bar
foo
100