From 474813d8e89ec0ecbcd715ab83fd963767da4244 Mon Sep 17 00:00:00 2001 From: Vinicius Silva Date: Fri, 22 Dec 2023 01:02:20 -0300 Subject: [PATCH] Add 04_comments folder --- 04_comments/main.v | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 04_comments/main.v diff --git a/04_comments/main.v b/04_comments/main.v new file mode 100644 index 0000000..d55e65c --- /dev/null +++ b/04_comments/main.v @@ -0,0 +1,26 @@ +/* + multiply accepts two integers arguments namely x and y + + It then performs multiplication of input arguments and + return the product which is again a type of integer as + specified in the function signature + + x is an input argumento accepts values of type of int + y is an input argument accepts values of type of int + + multiply functions returns the result of type int which + is a multiplication of input arguments x and y + +*/ +fn multiply(x int, y int) int +{ + return x * y +} + +// main function callable by operating system +pub fn main() +{ + println("Hello world") + + println(multiply(2,4)) +} \ No newline at end of file