summaryrefslogtreecommitdiff
path: root/ex2/src/main.rs
blob: 6341539aaef967472e71524d7f41b1d11b3067cf (plain)
1
2
3
4
5
6
7
8
9
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));
}