标签:etc idt img return lse getch space 换行 span
1、
#include <stdio.h> #include <string> int main() { char ch; int space_1 = 0; int break_1 = 0; int other_1 = 0; printf("请输入字符:"); while ((ch=getchar()) != ‘#‘) { if (ch == ‘ ‘) space_1++; else if (ch == ‘\n‘) break_1++; else other_1++; } printf("空格有%d个,换行符有%d个,其他字符有%d个", space_1, break_1, other_1); getchar(); getchar(); return 0; }
2、
标签:etc idt img return lse getch space 换行 span
原文地址:https://www.cnblogs.com/roscangjie/p/11811872.html