Friday, October 5, 2018

Colors in C Project


Using Colors in C Project

Following C code demonstrates how to use Colors in C program without using <graphics.h>.

#include<stdio.h>

int main()
{
  int i;
  printf("\n\n\n");
  for(i=0;i<10;i++)
  {
     system("color B1");
     printf("%c ",254);
  }
  printf("\n\n MAIN MENU \n\n");
  for(i=0;i<10;i++)
  {
      system("color A1");
      printf("%c ",254);
  }
  return 0;    
}

Output of program
Colors in C Program
Adding Colors to C Program

No comments:

Post a Comment