area of triangle by uru

package
main
import("os";f"fmt";."strings";s"strconv";m"math")func
main(){t:=make([]byte,1e4);l,_:=os.Stdin.Read(t);for _,u:=range Split(string(t[0:l-1]),`
`,0){var e [3]float64;for i,n:=range Split(u," ",0){e[i],_=s.Atof64(n)}w:=(e[0]+e[1]+e[2])/2;f.Printf(`%.0f
`,m.Sqrt(w*(w-e[0])*(w-e[1])*(w-e[2])))}}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page