"Eric Sosman" <> wrote in message
news

. ..
> Bill Cunningham wrote:
>> It is very easy to see what I am trying to do with this code:
>
> I'm not finding it easy. Please don't assume everyone
> else is as perceptive as you are.
>
>> #include <stdio.h>
>>
>> main(){
>> char name[200];
>> printf ("Enter -> ");
>> fflush (stdout);
>> fgets (name,200,stdin);
>> printf("is? ",name);}
>>
>> I have also tried this with the last line with printf
>>
>> printf("is? %c",name);
>>
>> Either way same results. Printf will not print the value of name.
>
> Perhaps you want
>
> printf ("is ? %s", name);
>
Yes minor stumbling block.
#include <stdio.h>
main(){
char name[200];
char name2[200];
printf ("Enter -> ");
fflush (stdout);
fgets (name,200,stdin);
printf("is? %s",name);
printf("what you mean? Try again.");
fflush(stdout);
fgets(name2,200,stdin);
if (name==name2) {printf("ok");}
else if (name!=name2){
printf("Sorry try again.");
return main();}
return 0;}
THanks now there seems to be an error with if here somewhere. I will try to
figure it out if not I would appreciate a look over.
Bill