2 releases

0.1.1 Jun 10, 2020
0.1.0 Jun 10, 2020

#898 in Math

Download history 1/week @ 2023-11-13 5/week @ 2023-11-20 8/week @ 2023-11-27 2/week @ 2023-12-18 6/week @ 2023-12-25 2/week @ 2024-01-22 4/week @ 2024-01-29 1/week @ 2024-02-05 10/week @ 2024-02-12 44/week @ 2024-02-19

59 downloads per month

MIT/Apache

6KB

Square Calculator

this is a demo rust library published on crates.io

to use this library you have to add following line in dependency section of cargo.toml

square_calculator = "0.1.1"

your cargo.toml file should look like this:

[package]
name = "square_calculator"
version = "0.1.1"
authors = ["N A Abbasi <nisar_abbasi@yahoo.com>"]
edition = "2018"

[dependencies]
square_calculator = "0.1.1"

In src/main.rs you can use like this:

use square_calculator;
fn main() {
    let (firstsq,secondsq) = square_calculator::square (10,12);
    println!("First square is {}",firstsq);
    println!("Second square is {}",secondsq);
}

following will also work:

use square_calculator::square;
fn main() {
    let (firstsq,secondsq) = square (10,12);
    println!("First square is {}",firstsq);
    println!("Second square is {}",secondsq);
}

now cargo run for results

No runtime deps