-
-
Notifications
You must be signed in to change notification settings - Fork 136
Logic Error fixed in Solution #72
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,14 +22,17 @@ int main(void) | |
if (i >= (MAXLINE - 1)) | ||
{ | ||
loop = 0; | ||
break; | ||
} | ||
else if (c == '\n') | ||
{ | ||
loop = 0; | ||
break; | ||
} | ||
else if (c == EOF) | ||
{ | ||
loop = 0; | ||
break; | ||
} | ||
|
||
|
||
s[i++] = c; | ||
|
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.
@SamiNasry Can we have it without the
break
until we figure out what's up with that? I find it very educational to learn how to deal with the differences between different machines.PS: I'm used to writing code in high-level programming languages, and I almost forgot about all these low-level implementation details.
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.
Yes I removed the break until we figure out why it acts like this. Thanks for your time.