Update the parameter list of the countryCapital function so that it can accept two parameters of the string type: capital and country.
Functions
Capitals and countries
Report a typo
Sample Input 1:
Berlin GermanySample Output 1:
Berlin is the capital of GermanyWrite a program in Go
package main
import "fmt"
// Update the parameter list of the countryCapital function below:
func countryCapital(?) string {
return capital + " is the capital of " + country
}
// DO NOT modify or delete the contents within the main function!
func main() {
var capital, country string
fmt.Scanln(&capital, &country)
fmt.Println(countryCapital(capital, country))
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.