learning-rust

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit f6530f3d727cc0b4009a30ea1387bb9719746204
parent c7783359ce007b67da35e8e84861c169da722ef7
Author: bdmfegys@duck.com <bdmfegys@duck.com>
Date:   Sun, 19 May 2024 18:07:49 -0400

main.rs: add some variables and an add line

Diffstat:
Mmain.rs | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/main.rs b/main.rs @@ -1,3 +1,11 @@ +fn add2(x: f64, y: f64) -> f64 { + x + y +} + fn main() { - println!("hello world!"); + const X: f64 = 1.2930; + + const Y: f64 = 92.839; + + println!("hello world! X = {X} and Y = {Y} \n added = {}", add2(X, Y)); }