#include int main() { char buffer[100]; int i=1; while (NULL != fgets(buffer, sizeof buffer, stdin)) { printf("%3d: %s", i++, buffer); } }