GOLANGPROFI Telegram 296
Как подсчитать общее количество элементов, определенных в Enum?

package main

import "fmt"

const (
I1 = 1 << iota
I2
I3
ILen int = iota
)

const (
X1 = "A"
X2 = "B"
X3 = "C"
XLen int = iota
)

func main() {
fmt.Println(I1, I2, I3, ILen)
fmt.Println(X1, X2, X3, XLen)
}

Ответ

Пишите свое решение в комментариях👇
👍3🤮2💩2



tgoop.com/golangprofi/296
Create:
Last Update:

Как подсчитать общее количество элементов, определенных в Enum?

package main

import "fmt"

const (
I1 = 1 << iota
I2
I3
ILen int = iota
)

const (
X1 = "A"
X2 = "B"
X3 = "C"
XLen int = iota
)

func main() {
fmt.Println(I1, I2, I3, ILen)
fmt.Println(X1, X2, X3, XLen)
}

Ответ

Пишите свое решение в комментариях👇

BY Golang Юниор


Share with your friend now:
tgoop.com/golangprofi/296

View MORE
Open in Telegram


Telegram News

Date: |

Polls With the “Bear Market Screaming Therapy Group,” we’ve now transcended language. While the character limit is 255, try to fit into 200 characters. This way, users will be able to take in your text fast and efficiently. Reveal the essence of your channel and provide contact information. For example, you can add a bot name, link to your pricing plans, etc. Users are more open to new information on workdays rather than weekends. As five out of seven counts were serious, Hui sentenced Ng to six years and six months in jail.
from us


Telegram Golang Юниор
FROM American