Advertisement
Guest User

Untitled

a guest
Jan 16th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main() {
  6. int x, y;
  7. cout << "Bitte geben Sie die Breite des Parallelogramms ein: ? ";
  8. cin >> x;
  9.  
  10. cout << "Bitte geben Sie die Hoehe des Parallelogramms ein: ? ";
  11. cin >> y;
  12.  
  13. for (int i = 0; i < y; i++) {
  14. for (int p = 0; p < i; p++) {
  15. cout << ".";
  16. }
  17. for (int j = 0; j < x; j++) {
  18. if (i == 0 || i == y-1 || j == 0 || j == x-1) {
  19. cout << '*';
  20. }
  21. else{
  22. cout << "+";
  23. }
  24. }
  25. cout << endl;
  26. }
  27.  
  28. cout << endl;
  29.  
  30. system("PAUSE");
  31. return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement