Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- using namespace std;
- void cls() {
- #if defined(_WIN32)
- system("cls");
- #elif defined(linux)
- system("clear");
- #endif
- }
- void wait() {
- #if defined(_WIN32)
- system("pause");
- #elif defined(linux)
- system("sleep 3");
- #endif
- }
- int main() {
- int i, j, l, w;
- char c;
- while (1) {
- cls();
- cout <<
- "Drawing with batch.." << endl << endl <<
- "Length >> ";
- cin >> l;
- cout << "Width >> ";
- cin >> w;
- cout << "Empty Space >> ";
- cin >> c;
- cls();
- for (i = 0; i < l; i++) {
- for (j = 0; j < w; j++)
- cout << c;
- cout << endl;
- }
- wait();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement