Freeman12 » 01 дек 2008, 18:07
Код: Выделить всё
#include<iostream.h>
#include<conio.h>
#include<math.h>
#include<string.h>
int str_cp(char str,size_r max,int a,int b,char ch)
{for (size i=a;i<b;i++)
str[i]=ch
int main(),a,b,g,w,e
{
char str [10];
char ch;
cout << "vvedite stroku: ";
cin >> str;
cout << "vvedide dlinnu slova: ";
cin >> g;
cout << "vvedide pervoe slovo: ";
cin>>w;
cout << "vvedide posednee slovo: ";
cin>>e;
a=w*g
b=e*g;
cout<<str_cp(str,strlen(str),a,b,ch)
}
подскажите,вот такое решение имеет прво на жизнь?
[code]#include<iostream.h>
#include<conio.h>
#include<math.h>
#include<string.h>
int str_cp(char str,size_r max,int a,int b,char ch)
{for (size i=a;i<b;i++)
str[i]=ch
int main(),a,b,g,w,e
{
char str [10];
char ch;
cout << "vvedite stroku: ";
cin >> str;
cout << "vvedide dlinnu slova: ";
cin >> g;
cout << "vvedide pervoe slovo: ";
cin>>w;
cout << "vvedide posednee slovo: ";
cin>>e;
a=w*g
b=e*g;
cout<<str_cp(str,strlen(str),a,b,ch)
}[/code]
подскажите,вот такое решение имеет прво на жизнь?