Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int i = 1; i <= 6; i++)
- {
- if (i != (i / 2) * 2)
- {
- int j = 0;
- do
- {
- j++;
- if (j <= i)
- {
- cout << j;
- if (j < i)
- {
- cout << "-";
- }
- }
- }
- while (j <= i);
- cout << "\x0d\x0a";
- }
- else
- {
- int j = i + 1;
- do
- {
- j--;
- if (j >= 1)
- {
- cout << j;
- if (j > 1) cout << "-";
- }
- }
- while (j >= 1);
- cout << "\x0d\x0a";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement