Skip to content

Conversation

@martinsparr
Copy link

Hey Mathias, please have a look at my code!!

try to iterate through the array and compare old with new
#include <string.h>
#include <stdio.h>

char oldletter;
Copy link
Owner

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'){
Copy link
Owner

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){
Copy link
Owner

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!!");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls remove printfs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants