Giter Site home page Giter Site logo

// C++ code to print a HEART Shape #include using namespace std;

int main() { // HERE, we have set the size of Heart, size = 15 int a, b, size = 15;

/* FOR THE APEX OF HEART */
for (a = size/2; a <= size; a = a+2)
{
    // FOR SPACE BEFORE PEAK-1 : PART 1
    for (b = 1; b < size-a; b = b+2)        
        cout<<" ";

    // FOR PRINTING PEAK-1 : PART 2
    for (b = 1; b <= a; b++)
        cout<<"A";

    // FOR SPACE B/W PEAK-1 AND PEAK-2 : PART 3
    for (b = 1; b <= size-a; b++)
        cout<<" ";
       
    // FOR PRINTING PEAK-2 : PART 4
    for (b = 1; b <= a-1; b++)
        cout<<"A";

    cout<<endl;
}

/*FOR THE BASE OF HEART ie. THE INVERTED TRIANGLE */

for (a = size; a >= 0; a--)
{
    // FOR SPACE BEFORE THE INVERTED TRIANGLE : PART 5 
    for (b = a; b < size; b++)
        cout<<" ";

    // FOR PRINTING THE BASE OF TRIANGLE : PART 6
    for (b = 1; b <= ((a * 2) - 1); b++)
        cout<<"B";

    cout<<endl;  
}

} // <3

FINESSIN<3HEARTS's Projects

flair icon flair

A very simple framework for state-of-the-art Natural Language Processing (NLP)

malware icon malware

Notes/scripts/etc from my malware analysis

pinjectra icon pinjectra

Pinjectra is a C/C++ OOP-like library that implements Process Injection techniques (with focus on Windows 10 64-bit)

spacy icon spacy

💫 Industrial-strength Natural Language Processing (NLP) in Python

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.