Capitals and countries

Report a typo

Update the parameter list of the countryCapital function so that it can accept two parameters of the string type: capital and country.

Sample Input 1:

Berlin Germany

Sample Output 1:

Berlin is the capital of Germany
Write 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))
}
___

Create a free account to access the full topic