Wednesday, 26 August 2020

HOW TO CODE FOR COLOR STAR PATTERN???

EVERYONE MIGHT THINK THAT IS IT POSSIBLE TO CODE A COLOR PATTERN???
YES IT IS POSSIBLE.
THE FOLLOWING CODE EXPLAINS ABOUT COLOR STARED PATTERN:

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();
for(i=0;i<5;i++)
{
for(j=0;j<i;j++)
{
textcolor(YELLOW);
cprintf("*");
}
printf("\n");
}
getch();
}


No comments:

Post a Comment

C Programming

What is DBMS in brief?

A Database Management System (DBMS) is a software suite designed to efficiently manage, organize, store, manipulate, and retrieve data. It a...