Skip to content

Conversation

@moreqqq
Copy link

@moreqqq moreqqq commented Dec 23, 2024

No description provided.

golang/main.go Outdated
Comment on lines 8 to 11
// fmt.Println("Морев Дмитрий Михайлович")
// laba4.Runlab4()
// laba6.Runlaba6()
// laba7.RunLaba7()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вернуть

fmt.Scan(&StringForFind)
n, _ := SearchingString(name, StringForFind)
if n == 1 {
fmt.Printf("Слово найденно на строке %d", n)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут всегда 1 строка выглядит странно

fmt.Println("Введите строку, которую хотите найти в файле: ")
var StringForFind string
fmt.Scan(&StringForFind)
n, _ := SearchingString(name, StringForFind)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно только bool возвращать без n и проверять его же

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants