【c++】字符串最後一個單詞的長度

計算字符串最後一個單詞的長度,單詞以空格隔開。字符串長度小於128c++ 輸入樣例 hello worldweb 輸出樣例 5svg 程序代碼:spa #include<string.h> #include<stdio.h> using namespace std; int main() { char str[128]; gets(str); int count=0;
相關文章
相關標籤/搜索