C/C++の宿題を片付けます 104代目
at TECH
181:デフォルトの名無しさん
08/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;
}
次ページ続きを表示1を表示最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
4969日前に更新/299 KB
担当:undef