Puzzle L32


Centered Row

[E-5]Write center(char ch, int count, int length) which prints count number of characters in the center of a line of length characters. Make the other characters of the line blank (or dot, for debugging purposes.) Here is the output for center('*', 5, 13)

....*****....

Here is a testing framework:

#include <stdio.h>

void center(char ch, int count, int length)
{
}

int main()
{
  center('*', 5, 13);  
  return 0;
}


Answer         Next Page         Previous Page Home