赞
踩
#include<stdio.h> int main() { int n; char a; printf(“input a string:\n”); for (n = 0; (a = getchar()) != ‘\n’; n++); printf("%d", n); }