Skip to content

Commit d6167b2

Browse files
committed
02_basic_calculator/02_variables
1 parent 7ae2816 commit d6167b2

File tree

1 file changed

+1
-0
lines changed
  • exercises/02_basic_calculator/02_variables/src

1 file changed

+1
-0
lines changed

exercises/02_basic_calculator/02_variables/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
pub fn speed(start: u32, end: u32, time_elapsed: u32) -> u32 {
99
// TODO: define a variable named `distance` with the right value to get tests to pass
1010
// Do you need to annotate the type of `distance`? Why or why not?
11+
let distance = end - start;
1112

1213
// Don't change the line below
1314
distance / time_elapsed

0 commit comments

Comments
 (0)