Missing packages and prefixes

Report a typo

Kendrick has created a small Go program that reads a value representing an angle (in degrees), and prints the difference between its sine and cosine to the terminal. However, he is missing very important package imports and function prefixes in his code.

Can you help Kendrick fix his code by adding the missing package imports and also the missing prefixes of the functions?

Sample Input 1:

60

Sample Output 1:

0.3660254037844385
Write a program in Go
package main

import (
// write the missing imports here
)

const ToRadians = math.Pi / 180

func main() {
// just add the missing prefixes to the functions below.
var angle float64
fmt.Scanf("%f", &angle)

angle *= ToRadians // do not modify this line, it converts the angle to radians

Println(Sin(angle) - math.Cos(angle))
}
___

Create a free account to access the full topic