Ad Code

Responsive Advertisement

Heart Pattern Using c language (sonu sagar)

Love ❤❤ U design using C-Programing @59code #shorts


You can visit on our youtube channel 
...and watch full video...




Programming code of Heart Pattern

#include <stdio.h>
#include<stdlib.h>

int main()

{

int i, j, n;
system("COLOR E");

printf("Enter the Size of Heart: ");

scanf("%d", &n);

printf("\n");

for(i=n/2; i<=n; i+=2)

{

printf("\t\t\t");

for(j=1; j<n-i; j+=2)

{

printf(" ");
}


for(j=1; j<=i; j++)

{

system("COLOR C");

printf("*");

}

printf("Love");

for(j=1; j<=n-i; j++)

{

system("COLOR F");

printf(" ");

}

printf("You");

for(j=1; j<=i; j++)

{

system("COLOR A");

printf("*");

}


printf("\n");

}


for(i=n; i>=1; i--)

{

    printf("\t\t\t");

for(j=i; j<n; j++)

{

system("COLOR C ");

printf(" ");

}

printf("You");

for(j=1; j<=(i*2)-1; j++)

{

    system("COLOR B");

printf("*");

}

    printf("Love");

 printf("\n");

 }

printf("\t\t\t");

system("COLOR E ");

printf("LOVE FROM SONU SAGAR \n");



return 0;

}

 Created by sonu sagar 
Subscribe our Channel
https://www.youtube.com/@59code

Post a Comment

0 Comments

Ad Code

Responsive Advertisement