diff options
| author | Brad Clawsie <brad@b7j0c.org> | 2026-10-30 08:35:37 -0500 |
|---|---|---|
| committer | Brad Clawsie <brad@b7j0c.org> | 2026-10-30 08:35:37 -0500 |
| commit | 9937dce696992c9765521a5820e21f5482a7a02c (patch) | |
| tree | c2a226a169b5d33d2bde0c0dfca40fa1fb92289f /ex2/src/main.rs | |
| parent | cbc3babb5326f38dd4c1c53bf8ad5b59dd72c0b5 (diff) | |
feat: ex2
commit cd4ab434ffd6af736b347055a641407a184afc8c
Author: Brad Clawsie <brad@b7j0c.org>
Date: Fri Oct 30 08:32:07 2026 -0500
ex2
Diffstat (limited to 'ex2/src/main.rs')
| -rw-r--r-- | ex2/src/main.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ex2/src/main.rs b/ex2/src/main.rs new file mode 100644 index 0000000..6341539 --- /dev/null +++ b/ex2/src/main.rs @@ -0,0 +1,10 @@ +fn velocity(start: u32, end: u32, time: u32) -> u32 { + if end < start { + panic!("end < start"); + } + end - start / time +} + +fn main() { + println!("{}", velocity(5,15,4)); +} |
