Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
master-embedded-systems
c-exercise-solutions public
Commits
87141ec9
Commit
87141ec9
authored
Nov 14, 2017
by
Dominik Widhalm
Browse files
Improved output of task 4.07
parent
9e27c52d
Changes
1
Show whitespace changes
Inline
Side-by-side
ch_4/task_07/main.c
View file @
87141ec9
...
...
@@ -83,8 +83,12 @@ int main (void) {
/* Output the resulting amount of coins */
printf
(
"
\n
For a deposit of %3.2fEUR you get ...
\n
"
,
cash
);
for
(
int
i
=
0
;
i
<
5
;
i
++
)
{
/* Check if there are coins of the current value */
if
(
coins
[
i
]
>
0
)
{
/* Print the current number of coins */
printf
(
"... %d coins of value %1.2fEUR
\n
"
,
coins
[
i
],((
double
)
coin_value
[
i
]
/
10
.
0
));
}
}
/* Notify the user about the termination of the program */
printf
(
"
\n
The program will now be terminated...
\n
"
);
...
...
Write
Preview
Supports
Markdown
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