2 8
2 15 400
1 13 100
3 26
3 27
3 28
3 29
3 30
3 31
3 32
3 33
 3 8
2 15 400
1 1 200
1 13 100
3 26
3 27
3 28
3 29
3 30
3 31
3 32
3 33

400
400
500
500
800
800
800
800
 600
600
600
700
800
1000
1000
1000

#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, r;
  cout << "\n\n Display the pattern like a diamond:\n";
  cout << "----------------------------------------\n";
  cout << " Input number of rows (half of the diamond): ";
  cin >> r;
  for (i = 0; i <= r; i++) {
    for (j = 1; j <= r - i; j++) cout << " ";
    for (j = 1; j <= 2 * i - 1; j++) cout << "*";
    cout << endl;
  }
  for (i = r - 1; i >= 1; i--) {
    for (j = 1; j <= r - i; j++) cout << " ";
    for (j = 1; j <= 2 * i - 1; j++) cout << "*";
    cout << endl;
    ;
  }
}
