Программа нахождения наибольшего слова в строке. Найдите ошибку!
Суть в том, что число наибольшего слова выводит верно, а строку не хочет. в чем проблема? Ошибка не в выводе.
#include
#include
#include
#include
#include "stdAfx.h"
using namespace std;
int main() {
char str[201];
printf ("string? ");
fgets (str, 11, stdin);
char str1[201]; char str2[201];
int max, test;
test=0; max=0;
str1=""; str2="";
for (int i=0; ((i<200) && (str!=0)); i++)
if (str!=' ') {test++; str2=str2+str;}
else if (max
#include
#include
#include
#include
#include "stdAfx.h"
using namespace std;
int main() {
char str[201];
printf ("string? ");
fgets (str, 11, stdin);
char str1[201]; char str2[201];
int max, test;
test=0; max=0;
str1=""; str2="";
for (int i=0; ((i<200) && (str!=0)); i++)
if (str!=' ') {test++; str2=str2+str;}
else if (max
почему код не пишет полный тут???
http://pastebin.com/cE4heNDn