publishing_crate 0.1.0

Basic math operation
Documentation

//! #Basic math crate
//! This is a collection of some generally used math functions
/// Compute the square of a given number
/// # Examples
/// ```
/// let n=5;
/// let result=publishing_crate::square(n);
/// assert_eq!(25,result)
/// ```

/*

"///" used for doc
cargo doc --open
 */

pub fn square(num:i32)->i32{
    num*num
}


/// Compute the cube of a given number
/// # Examples
/// ```
/// let n=5;
/// let result=publishing_crate::cube(n);
/// assert_eq!(125,result)
/// ```

/*

"///" used for doc
cargo doc --open
go to crates.io and login with github
get email verified
cargo login api_token
update Cargo.toml with authors, description, license
cargo publish --allow-dirty
 */

pub fn cube(num:i32)->i32{
    num*num*num
}