fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int k,s,i=0;
  6. k=1;
  7. s=3;
  8. cout<<"i s k"<<endl;
  9. while(s<100){
  10. s=s+5;
  11. k=k+2;
  12. i++;
  13. cout<<i<<" "<<s<<" "<<k<<endl;
  14. }
  15. cout<<k;
  16. return 0;
  17. }
Success #stdin #stdout 0s 4296KB
stdin
24 36
stdout
i   s    k
1  8  3
2  13  5
3  18  7
4  23  9
5  28  11
6  33  13
7  38  15
8  43  17
9  48  19
10  53  21
11  58  23
12  63  25
13  68  27
14  73  29
15  78  31
16  83  33
17  88  35
18  93  37
19  98  39
20  103  41
41