Помогите написать программу в с++ . Очень надо. В произвольном тексте программа выводит самое короткое слово.
//самое короткое слово
#include
#include
#include
using namespace std;
int main(int argc, char** argv) {
int i=0,j=0,l=0;
char st[200];
char ch= ;
cout<<" string: "; gets(st); cout<
int mn,bgmn,emn,tek;
mn=strlen(st); bgmn=0;
while (true) {
while ((st[j]!=ch) and (j
for (int i=l; i
j++; l=j;
}
//запись строки
for (int i=bgmn; i<=emn; i++) mins=mins+st[i];
cout<<"short word: "<
return(0);
}
Оцени ответ
