extern crate mathlogic;
extern crate mathlogic::math;
extern crate mathlogic::weight;
extern crate mathlogic::calculater_int;
extern crate mathlogic::calculater_float;
let power = mathlogic::math::pow(2, 8);
println!("{}", power);
let square = mathlogic::math::square(25.4);
println!("Square is {}", square);
let percentage = mathlogic::math::percentage(154.5, 200.0);
println!("Percentage is {}%", percentage);
let a = mathlogic::math::fibonacci(10, 50, 10);
println!("Result => {:?}", a); //This will return result in Vector
let cr = mathlogic::math::circle_radius(20.8);
println!("Radius of Circle is {}", cr);
``` let add = mathlogic::calculateint::add(10, 20); let min = mathlogic::calculateint::min(50, 20); let div = mathlogic::calculateint::div(20, 80); let mul = mathlogic::calculateint::mul(10, 50);
println!("Result of add is {}", add); println!("Result of min is {}", min); println!("Result of div is {}", div); println!("Result of mul is {}", mul); ```
``` let add = mathlogic::calculatefloat::add(10.4, 20.55); let min = mathlogic::calculatefloat::min(50.5, 20.3); let div = mathlogic::calculatefloat::div(20.2, 80.4); let mul = mathlogic::calculatefloat::mul(10.5, 50.6);
println!("Result of add is {}", add); println!("Result of min is {}", min); println!("Result of div is {}", div); println!("Result of mul is {}", mul); ```
``` let ltk = mathlogic::weight::lbstokgs(50.5); println!("Pounds to Kilograms {}", ltk);
let ltg = mathlogic::weight::lbstogrms(50.5); println!("Pounds to Grams {}", ltg); ```
``` let ktl = mathlogic::weight::kgstolbs(22.906649732377755); println!("Kilograms to Pounds {}", ktl);
let ktg = mathlogic::weight::kgstogrms(150.550); println!("Kilograms to Grams {}", ktg); ```
``` let gtl = mathlogic::weight::grmstolbs(22.90); println!("Grams to Pounds {}", gtl);
let gtk = mathlogic::weight::grmstokgs(500.255); println!("Grams to Kilograms {}", gtk); ```