diff --git a/Solutions/solutions.md b/Solutions/solutions.md new file mode 100644 index 0000000..9226dfc --- /dev/null +++ b/Solutions/solutions.md @@ -0,0 +1,24 @@ +fn main() { +let \_difference: u8 = sub_u8(3, 1); +println!("result_diff: {}", \_difference); + + let _product_: u8 = mul_u8(2, 5); + println!("result_product: {}", _product_); + + + let _divident_: u8 = div_u8(10, 5); + println!("result_divident: {}", _divident_); + +} + +fn sub_u8(x: u8, y: u8) -> u8 { +x - y +} + +fn mul_u8(x: u8, y: u8) -> u8 { +x \* y +} + +fn div_u8(x: u8, y: u8) -> u8 { +x / y +} diff --git a/src/lib.cairo b/src/lib.cairo index 587aad4..a3d5d3e 100644 --- a/src/lib.cairo +++ b/src/lib.cairo @@ -1,4 +1,4 @@ -fn main() { + fn main() { let sum_1: u8 = intro_to_uint(); let sum_2: u8 = sum_u8(2, 2); @@ -19,6 +19,4 @@ fn main() { fn sum_u8(x: u8, y: u8) -> u8 { x + y - } - - \ No newline at end of file + } \ No newline at end of file