when someone types in a name with only alphabetic characters it outputs valid name for how long the name is. For Ex: bob is three characters so it would output valid name three times. also when you put in a name with a number or character at the end it outputs valid name for the correct characters but also outputs the invalid character and invalid name which its supposed to do. the valid name should not be showing up though.
You are outputting "Valid name" each iteration of the loop. Instead try making a boolean variable and init it to true, then in the for loop, if the condition ever fails (not a letter) you set it to false and break. Now you can use your boolean in an if statement and another for loop (i=0; i < strlen(name); ++i) to output the name x number of times :)