Skip to content

Commit

Permalink
Create bar.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
0xb-s authored Sep 18, 2024
1 parent e17b808 commit ac6f273
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions examples/bar.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
use math::solver::solve_equation;

fn main() {
let equations = vec![
"2x + 3 = 7",
"x/0 = 5",
"x^2 - 4 = 0",
"x^3 - 1 = 0",
"5 = 5",
"3 = 7",
"x^4 + 1 = 0",
];

for equation_str in equations {
println!("\nSolving Equation: {}", equation_str);
match solve_equation(equation_str) {
Ok(solution) => println!("Solution: {}", solution),
Err(e) => println!("Error: {}", e),
}
}
}

0 comments on commit ac6f273

Please sign in to comment.