fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. string carNumber;
  8. cout<<"請輸入欲查詢的車牌號碼(至多六碼,末兩碼為英文字母):";
  9. cin >> carNumber;
  10. cout << carNumber.length() << endl;
  11. return 0;
  12. }
  13.  
Success #stdin #stdout 0.01s 2728KB
stdin
Standard input is empty
stdout
請輸入欲查詢的車牌號碼(至多六碼,末兩碼為英文字母):0