Advertisement
Guest User

Untitled

a guest
Dec 14th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int c=7111,i,z=0, x=1,o=1,l=0;
  8. cin>>i;
  9. for(x;x<=i;)
  10. {
  11. cout<<x<<"-";
  12. for(o;o<=2;o++)
  13. {
  14. if(x2<=z)
  15. {break;
  16. }
  17. z=z+x;
  18. cout<<z<<" ";
  19. if(z<=c)
  20. {l++;
  21. }
  22. }
  23. o=1;
  24. cout<<endl;
  25. x=x3;
  26. }
  27. cout<<endl<<"losses:"<<l;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement