Uncategorized

Average and median of number list using GO language

/* Go-lang programme to determine the average and median using float32 array*/ package main import “fmt” func main(){ var n,flag int var temp,sumx,avg float32 var a [30]float32 sumx=0 flag=0 fmt.Println(“enter the value of n “) fmt.Scanf(“%d”,&n) fmt.Println(“enter the numbers”) for i := 0; i < n; i++ { fmt.Scanf(“%f”,&a[i]) } for i := 0; i […]

Scroll to top

Pin It on Pinterest