I have to do a program that reads a text, where each first letter of each word of the text is replaced by a character (*). I can not compile correctly, I believe the problem is in my condition ( if
).
#include <stdlib.h>
#include <string.h>
#define MAX 500
int main()
{
char text [MAX+1];
int i;
printf("Informe o texto (tamanho maximo %d caracteres:", MAX);
fflush(stdin);
gets(text);
for (i=0; i<=MAX; i++) {
if(' text[i]'==text[i]);
text[i]=' *';
}
printf(" O texto final e %s\n", text);
}