跳转至内容

C++ 编程/练习/变量和类型

取自维基教科书,面向开放世界的开放书籍
  1. include<iostream>
  2. include<cstdio>

using namespace std int main() { char name[100]; int count=0; cout<<"enter a string"; gets(name); while(name[count]!='10') { count++; } cout<<"length of the string is"<<count; }

华夏公益教科书