most_used_functions

Crates.iomost_used_functions
lib.rsmost_used_functions
version0.1.0
sourcesrc
created_at2020-06-14 01:43:01.115341
updated_at2020-06-14 01:43:01.115341
descriptionLibrary for most used fuctions such as input , mathematical operations.
homepagehttps://github.com/badar343/most_used_functions
repositoryhttps://github.com/badar343/most_used_functions
max_upload_size
id253739
size15,133
Badar Tariq (badar343)

documentation

README

First Welcome

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

firstwelcome = "0.1.0"

your cargo.toml file should look like this:

[package]
name = "most_used_functions"
version = "0.1.0"
authors = ["badar343 <66517064+badar343@users.noreply.github.com>"]
edition = "2018"

[dependencies]
most_used_functions = "0.1.0"

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

//for input
use most_used_functions;
use most_used_functions::get_input;
fn main() {
	let input = get_input::take_input();
}

following will also work:

//for calculatios. x , y should integer
use most_used_functions::calculate;
fn main() {
	calculate::add(x , y);        //for addition of two numbers
	calculate::subtract(x , y);   //for sutraction of two numbers
	calculate::divide(x , y);     //for division of two numbers
	calculate::multiply(x , y);   //for multiplication of two numbers
	calculate::modulus(x , y);    //for reminder 
    }

now cargo run for results

Commit count: 12

cargo fmt