Sunday, November 28, 2010

Write a program to read and accept 5 single characters from the keyboard

#include
main()
{
int c,i;
i = 1;

while (i <= 5)
{
c = getchar();
if ( c == ' ' || c == '\n' || c == '\t')
++i;
}

}