Advertisement
Guest User

Untitled

a guest
Feb 15th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int stuff(){
  4. static int c=0;
  5. c++;
  6. return c;
  7. }
  8. int main() {
  9. for(int i=0;i<20;i++){
  10. if(i%5==0){
  11. cout<<stuff()<<endl;
  12. }
  13. }
  14. return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement