cube

Function cube 

Source
pub fn cube(num: i32) -> i32
Expand description

to compute a cube of given number

§Examples

let x = 2; println!(“cube is : {}”, cube(x));

output : square is : 8

§Tests

let n = 5;
let ans = crate_exp::cube(n);
 
assert_eq!(125,ans);

§Limitation

only for i32 type integers

§Other Details

etc etc