fork download
  1. #include <stdio.h>
  2.  
  3. inline int min(int a, int b) {
  4. return a<b ? a : b;
  5. }
  6.  
  7. int main(void) {
  8. int indexCor = 0;
  9. while ( indexCor != 20 ) {
  10. printf("%d -->", indexCor);
  11. printf("%d\n", min(indexCor++/2, 6));
  12. }
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 2248KB
stdin
Standard input is empty
stdout
0 -->0
1 -->0
2 -->1
3 -->1
4 -->2
5 -->2
6 -->3
7 -->3
8 -->4
9 -->4
10 -->5
11 -->5
12 -->6
13 -->6
14 -->6
15 -->6
16 -->6
17 -->6
18 -->6
19 -->6