All pastes #60126 Raw Edit

Miscellany

public c v1 · immutable
#60126 ·published 2006-05-31 00:50 UTC
rendered paste body
#include <stdio.h>int main(){    char t[100];    int i=0;    int c=0;    for (i=0; i < 100-1 && (c=getchar()) != EOF && c != '\n'; ++i);         t[i] =c;    if (c=='\n') {          t[i]=c;          ++i;    }    t[i]='\0';    printf("%s\n",t);    return 0;}