Right Side Diamond shape.

 

#include<iostream>

#include<string>

using namespace std;

int main()

{

       int str;

       string up;

       cout << endl << "Enter Of Row = ";

       cin >> str;

       cout << "Enter Character To Print In Your Shape = ";

       cin >> up;

       for (int d = 1; d <= str; ++d)

       {

              for (int g = 1; g <= d; ++g)

              {

                     cout << up;

              }

              cout << endl;

       }

       for (int h = str; h >= 1; --h)

       {

              for (int N = 1; N <= h; ++N)

              {

                     cout << up;

              }

              cout << endl;

       }

       system("pause");

}



Comments

Popular Posts