- 181 名前:デフォルトの名無しさん mailto:sage [2008/02/11(月) 14:54:09 ]
- >>180
#include <iostream> #include <string> using namespace std; int main() { while(1) { cout << "入力="; string s; cin >> s; if( s.find_first_of( "0123456789" ) == string::npos ) { cout << "出力=" << s.substr( s.find_first_not_of( "a" ) ) << "\n"; break; } else { cout << "数値が含まれるので、再度入力してください。\n"; } } return 0; }
|

|