Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Alexander Hirsch
703602-Compiler-Construction
Commits
59f068b7
Commit
59f068b7
authored
May 21, 2019
by
Alexander Hirsch
Browse files
Fix missing print_nl
parent
4be96d35
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
examples/number_guessing/number_guessing.mc
examples/number_guessing/number_guessing.mc
+4
-3
No files found.
examples/number_guessing/number_guessing.mc
View file @
59f068b7
...
...
@@ -6,7 +6,7 @@ void guessNumber(int number, int max) {
while(!success) {
print("Enter a number between 0 and ");
print_int(max);
print
("\n"
);
print
_nl(
);
int guess;
guess = read_int();
success = guess == number;
...
...
@@ -14,9 +14,10 @@ void guessNumber(int number, int max) {
print("you guessed correct");
else {
if(guess
<
number
)
print
("
the
number
is
bigger
\
n
");
print
("
the
number
is
bigger
");
else
print
("
the
number
is
smaller
\
n
");
print
("
the
number
is
smaller
");
print_nl
();
}
}
print_nl
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment