-
Notifications
You must be signed in to change notification settings - Fork 79
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
Лабораторная работа №3 - Садовничий #112
base: Sadovnichij_Denis_Vladimirovich
Are you sure you want to change the base?
Changes from 3 commits
a8f7a64
09e0ed5
81422f9
67901cf
85490e2
42434ed
462abc1
3627c2e
60fcd0a
b53dc6b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
**/.DS_Store | ||
golang/.DS_Store | ||
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,7 +1,36 @@ | ||||||
package main | ||||||
|
||||||
import "fmt" | ||||||
import ( | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. файлики .DS_Store добавьте в gitignore There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Все еще не удалили DS_Store, а без этого не смогу заапрувить PR |
||||||
"fmt" | ||||||
"math" | ||||||
) | ||||||
|
||||||
func main() { | ||||||
fmt.Println("Hello world") | ||||||
var masB = []float64{1.16, 1.32, 1.47, 1.65, 1, 93} | ||||||
const a float64 = 2.0 | ||||||
fmt.Println("___Задание А___") | ||||||
fmt.Println(TaskA(a)) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. В задачу а также нужно передать диапазон изменения х There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. все еще не поменялось |
||||||
fmt.Println("___Задание В___") | ||||||
fmt.Println(TaskB(a, masB)) | ||||||
} | ||||||
|
||||||
func TaskA(a float64) []float64 { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
var taskA []float64 | ||||||
for x := 1.2; x < 4.2; x = x + 0.6 { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
taskA = append(taskA, formula(x, a)) | ||||||
} | ||||||
return taskA | ||||||
} | ||||||
|
||||||
func TaskB(a float64, masB []float64) []float64 { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
var taskB []float64 | ||||||
for i := 0; i < len(masB); i++ { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
taskB = append(taskB, formula(masB[i], a)) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
} | ||||||
return taskB | ||||||
} | ||||||
|
||||||
func formula(x float64, a float64) float64 { | ||||||
var y float64 = (math.Log10(a + x)) / ((a + x) * (a + x)) | ||||||
return y | ||||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
можно * добавить **/.DS_Store
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ну и сам DS_Store надо удалить
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Сам бинарный файл все еще присутствует в репозитории
https://stackoverflow.com/questions/13541615/how-to-remove-files-that-are-listed-in-the-gitignore-but-still-on-the-repositor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А почему опять файлик DsStore попал? мы ж в прошлый раз починили?