I'm suppose to make a code that is suppose to check errors on inputted letters but I can't seem to get it right cause when I input something either wrong or right it still prints "ERROR"
void check(char a, char b, char c, char d,char e,char f, char g, char h)
{
if void check(char a, char b, char c, char d,char e,char f, char g, char h)
{
if (a==a||b==b||c==c||d==d)
printf("same letter \n");
else if(a&&b&&c&&d != 'a','b','c','d','e','g','l','m','p','r','s','t');
printf("wrong letter \n");
}
}
the characters a,b,c &d are suppose to be the inputted code. I'm not suppose to let it input same letters like aabc, the second one is suppose to print "wrong letter" if the letters inputed are not a,b,c,d,e,g,l,m,p,r,s&t. My problem is any code I input it just prints both "same letter" & "wrong letter". Any help is appreciated :)