跳轉至內容

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; }

華夏公益教科書