Class 36 bureaucrat Hermes Konrad loves order and hot peppers. He also likes to count how many times the number 36 fits into the numbers that he sees during the day. And if the number is divided without a remainder, then he asks his wife to add 1 more hot pepper to dinner. But after his son and Cubert played with the Go calculator, it completely stopped working. Help him debug the program.
Debugging Go code in GoLand
Debug program
Report a typo
Sample Input 1:
36Sample Output 1:
PepperSample Input 2:
4Sample Output 2:
NoWrite a program in Go
package main
import "fmt"
const (
class = 36
pepper = "Pepper"
no = "No"
)
func main() {
var number string
fmt.Scanln(&number)
switch class % number {
case 0:
fmt.Println(pepper)
case 1, 8, 10, 35:
fmt.Println("Pepperoni")
default:
fmt.Println(no)
}
}
___
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.