Search This Blog

Thursday, October 13, 2011

Write a comprehansive program to fill the entire screen with specific character

   1:  #include<stdio.h>
   2:  #include<conio.h>
   3:  void fillscr(char fillchar);
   4:  void main()
   5:  {
   6:  char ch;
   7:  printf("Enter the character:");
   8:  ch=getche();
   9:  fillscr(ch);
  10:  getch();
  11:  }
  12:  void fillscr(char fillchar)
  13:  {
  14:  int i,j;
  15:  for(i=0;i<=25;i++)
  16:      for(j=0;j<=80;j++)
  17:      putchar(fillchar);
  18:  }

No comments:

Post a Comment