Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void Clr(void) { for(int i = 0; i < 20; ++i) cout << '\n'; }
- int main()
- {
- int *aeiou = nullptr;
- int w = -1;
- cin >> w;
- int h = -1;
- cin >> h;
- if(h < 1 || w < 1) // Von mir aus auch < 0
- {
- cout << "Nein\n";
- return 0;
- }
- aeiou = new int[w * h];
- cout << "aeiou:\n";
- for(int i = 0; i < w * h; ++i)
- {
- cin >> aeiou[i];
- }
- Clr();
- for(int y = 0; y < h; ++y)
- {
- for(int x = 0; x < w; ++x)
- {
- cout << aeiou[w * y + x] << ' ';
- }
- cout << '\n';
- }
- if(aeiou) delete[] aeiou;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement