According to legend...

Report a typo

Our Resistance spies want to input a string with information that a dark desert planet was located within the Unknown Regions.

Your task is to help the spies scan the input data and save each input into the correct variable. Take notice that the input data follows a specific order!

Sample Input 1:

Exegol None F-7
-3.212 -5.211 
53 210

Sample Output 1:

System: Exegol
Moons: None
Grid square: F-7

Latitude: -3.212
Longitude: -5.211

Rotation period in days: 53
Orbital period in days: 210
Write a program in Go
package main

import "fmt"

func main() {
var system, moons, grid string
var latitude, longitude float64
var rotation, orbital int

// Scan the input into the correct variables below:
fmt.Scan(&?, &?, &?)
fmt.Scan(&?, &?)
fmt.Scan(&?, &?)

// DO NOT delete the code block below!
fmt.Println("System:", system)
fmt.Println("Moons:", moons)
fmt.Println("Grid square:", grid)

fmt.Println("\nLatitude:", latitude)
fmt.Println("Longitude:", longitude)

fmt.Println("\nRotation period in days:", rotation)
fmt.Println("Orbital period in days:", orbital)
}
___

Create a free account to access the full topic