Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- int c=7111,i,z=0, x=1,o=1,l=0;
- cin>>i;
- for(x;x<=i;)
- {
- cout<<x<<"-";
- for(o;o<=2;o++)
- {
- if(x2<=z)
- {break;
- }
- z=z+x;
- cout<<z<<" ";
- if(z<=c)
- {l++;
- }
- }
- o=1;
- cout<<endl;
- x=x3;
- }
- cout<<endl<<"losses:"<<l;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement