use std::cmp::PartialOrd;
fn greatest<T:PartialOrd>(a:T,b:T,c:T)->T{
if a>b && a>c{
a
}
else if b>a && c>a{
b
}
else{
c
}
}
fn main() {
let x = 100;
let y = 200;
let z = 150;
println!("\nGreatest of 3 integers => {}, {} and {} is {}", x, y, z, greatest(x, y, z));
let x = 10.5;
let y = 2.1;
let z = 8.9;
println!("\nGreatest of 3 floats => {}, {} and {} is {}", x, y, z, greatest(x, y, z));
}