Wednesday, November 14, 2018

How to print a Number Series with color output ?


  Program:---
#include<stdio.h>
#include<graphics.h>
#include<conio.h>
void main()
{
clrscr();
for(int i=1;i<=10;i++)
{
for(int j=1;j<=i;j++)
{
textcolor(i);
cprintf("%d",j);
}
printf("\n");
}
getch();
}

1 comment: