This program is to do different calculations.right now it is only doing the basic operations for two numbers given in main, I'm trying to upgrade it to calculate for more than 2 numbers and more like for unknown number of number given in input.
package main
import (
"fmt"
)
func add (n int , m int) int {
sum := n + m
return sum
}
func sub (n int , m int) int {
diff := n - m
return diff
}
func mul (n float32 , m float32) float32 {
pro := n * m
return pro
}
func div (n float32 , m float32) float32 {
quo := n / m
return quo
}
func main() {
fmt.Println(add(4,6))
fmt.Println(sub(4,6))
fmt.Println(mul(4,6))
fmt.Println(div(6,4))
}