Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cube-root-training
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kevin Lyda
cube-root-training
Commits
e07cf2b0
Commit
e07cf2b0
authored
Oct 13, 2017
by
Kevin Lyda
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Based on caution / feedback from SA.
parent
9946b1f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
cube-test.c
cube-test.c
+6
-3
No files found.
cube-test.c
View file @
e07cf2b0
...
...
@@ -27,6 +27,7 @@ read_number() {
if
(
!
fgets
(
buf
,
sizeof
buf
,
stdin
))
{
return
0
;
}
buf
[
9
]
=
0
;
return
atoi
(
buf
);
}
...
...
@@ -80,9 +81,11 @@ main(int argc, char *argv[]) {
guess
=
read_number
();
delta
=
end_timer
(
&
timer
);
if
(
guess
==
0
)
{
printf
(
"Got %d correct out of %d.
\n
"
,
correct
,
iterations
);
printf
(
"Average time to answer was %s
\n
"
,
humanize_usec
(
delta_total
/
iterations
));
if
(
iterations
)
{
printf
(
"Got %d correct out of %d.
\n
"
,
correct
,
iterations
);
printf
(
"Average time to answer was %s
\n
"
,
humanize_usec
(
delta_total
/
iterations
));
}
exit
(
0
);
}
iterations
++
;
...
...
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