-
Notifications
You must be signed in to change notification settings - Fork 41
implement is_isogram #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
try to iterate through the array and compare old with new
| #include <string.h> | ||
| #include <stdio.h> | ||
|
|
||
| char oldletter; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we move these into the method and have local variables instead of globals?
|
|
||
| bool is_isogram(const char phrase[]){ | ||
|
|
||
| wihle(phrase[count] != '\0'){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type while
| wihle(phrase[count] != '\0'){ | ||
| newletter = phrase[counter]; | ||
|
|
||
| if (counter >= 1){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo counter
| if (counter >= 1){ | ||
| oldletter = phrase[counter -1]; | ||
| if (newletter == oldletter){ | ||
| printf("It`s not an isisogram!!"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls remove printfs
Hey Mathias, please have a look at my code!!