Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<string>
- #include<sstream>
- using namespace std;
- int main(){
- string a;
- getline(cin, a);
- string w[100];
- int c = 0;
- stringstream X;
- X << a;
- while (X >> w[c++]);
- c--;
- int min;
- min = w[0].size();
- for (int i = 0; i < c; i++){
- if (min > w[i].size()){
- min = w[i].size();
- }
- }
- cout << min;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement