Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <sstream>
- using namespace std;
- int main()
- {
- int a=0;
- int b=0;
- int maxLoopsNumber=0;
- string str;
- getline (cin,str);
- stringstream(str) >> a;
- getline (cin,str);
- stringstream(str) >> b;
- getline (cin,str);
- stringstream(str) >> maxLoopsNumber;
- int m = 58;
- int n = 33;
- int x = 1;
- int y = 1;
- for (int i = 0; i < maxLoopsNumber; i++)
- {
- if (x >= a && y > b)
- {
- break;
- }
- if (x > a)
- {
- x = 1;
- }
- if (y > b)
- {
- y = 1;
- x++;
- }
- if (n > 47)
- {
- n = 33;
- }
- if (m > 64)
- {
- m = 58;
- }
- char mChar = (char)m;
- char nChar = (char)n;
- cout << nChar << mChar << x << y << mChar << nChar << "|";
- m++;
- n++;
- y++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement