PDA

Просмотр полной версии : Help!!!


cheyzer1993
03.02.2011, 16:50
#include <iostream.h>

void max(int i, int j)
{
if(i>j)
cout<<i<<" bolshe!\n";
else cout<<j<<" bolshe!\n";
}

void max(char i[20], char j[3])
{ for(int k=0;k<strlen(i);k++)
{ int l=0;
int point=0;
if(i[k]==j[l] && i[k+1]==j[l+1] && i[k+2]==j[l+2])
{ point=k+1;
}
if(point>0)
cout<<"\nPodstroka nachinaetsya s simvola "<<point;
}
}

void main()
{ int i,j;
cout<<"Vvedite celue chisla : \n";
cin>>i;
cin>>j;
max(i,j);
char str1[20];
char str2[3];
cout<<"Vvedite stroky : \n";
gets(str1);
cout<<"Vvedite podstroky s 3-x simvolov: \n";
gets(str2);
max(str1,str2);
}


Нужна блок схема срочно!!!!