C++ SOURCE CODE FOR KITE FREE DOWNLOAD

DOWNLOAD FREE SOURCE CODE FOR KITE IN C++:

This is code written in language C++ that prints kite on the console for the given size.The program ask the user to enter the size of the kite and then print the kite on the console.You can download the code by clicking the download button below or you can copy paste the code.

HAPPY CODING!!! 

 

#include <iostream>
#include<windows.h>

using namespace std;


int kite_1(int x,int i,int j,int size)
{
    if (x>j)
    return 0;

    else
    {

        if (x==i || x==j || x==size || i==1)
        cout<<"*";

        else
        cout<<" ";
        x++;
        return kite_1(x,i,j,size);

    }
}


int kite_2(int i,int j,int size,bool condition)
{

    if (i>j)
    return 0;



  else
  {
if (i==0)
  {
    i=i+2;
    j=j-2;
    condition=false;
  }

     int x=1;
     kite_1(x,i,j,size);
      cout<<endl;

if (condition==true)
    {//start if
      i--;
      j++;
    }

    else
    {
        i++;
        j--;
    }
      return kite_2 (i,j,size,condition);
  }
}




int main()
{
    int size;
    cout<<"Enter the size:";
    cin>>size;
int i=size;
int j=size;
bool condition=true;

kite_2(i,j,size,condition);

system("pause");
return 0;


}

DOWNLOAD CODE WITH EXECUTABLE FILE:



 

No comments:

Post a Comment