Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added lab №8 #602

Open
wants to merge 3 commits into
base: Morev_Dmitrii
Choose a base branch
from
Open

added lab №8 #602

wants to merge 3 commits into from

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