Witam
Mam oto taki program :
// stringi 2.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <conio.h>
#include <string.h>
int _tmain(int argc, _TCHAR* argv[])
{
char wyraz[60]={0};
char string[1000]={0};
char x;
int z;
for(;;)
{
printf("\nPodaj wyraz: ");
gets(wyraz);
x=wyraz[0];
int length = strlen(wyraz);
wyraz[length+1]=' ';
strcat(string, wyraz);
length = strlen(string);
for(z=0;z<length;++z)
{
if(x==string[z]) string[z]='*';
}
printf("\nilosc znakow:%d",length);
printf("\n%s",string);
}
_getch();
return 0;
}
Jak wymusić od programu aby przy łączeniu zdań występowała między nimi spacja , niestety obecne rozwiązanie jest nieskuteczne. Proszę o pomoc, pozdrawiam