Skip to content

Commit

Permalink
Merge branch 'Titova_Darya' into lab7
Browse files Browse the repository at this point in the history
  • Loading branch information
dusyaT authored Dec 18, 2024
2 parents 3d8e5c1 + 9056cf2 commit d3b2ea8
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 25 deletions.
36 changes: 18 additions & 18 deletions golang/labs/lab4/lab4.go
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
package lab4

import (
"fmt"
"math"
"fmt"
"math"
)

func Lab4A(xn, xk, dx float64) float64 {
fmt.Println("\nЗадача А")
for x := xn; x <= xk; x += dx {
fmt.Printf("y(%f) = %f\n", x, Lab4Y(x))
}
return 0
fmt.Println("\nЗадача А")
for x := xn; x <= xk; x += dx {
fmt.Printf("y(%f) = %f\n", x, Lab4Y(x))
}
return 0
}

func Lab4B(xv []float64) float64 {
fmt.Println("Задача B")
for i := 0; i < len(xv); i++ {
fmt.Printf("y(%f) = %f\n", xv[i], Lab4Y(xv[i]))
}
return 0
fmt.Println("Задача B")
for i := 0; i < len(xv); i++ {
fmt.Printf("y(%f) = %f\n", xv[i], Lab4Y(xv[i]))
}
return 0
}

func Lab4Y(x float64) float64 {
var DegreeAsin, DegreeAcos, DegreeNumerator, DegreeDenumenator float64 = 4, 6, 1, 7
return (math.Pow(math.Pow(math.Asin(x), DegreeAsin)+math.Pow(math.Acos(x), DegreeAcos), DegreeNumerator/DegreeDenumenator))
var DegreeAsin, DegreeAcos, DegreeNumerator, DegreeDenumenator float64 = 4, 6, 1, 7
return (math.Pow(math.Pow(math.Asin(x), DegreeAsin)+math.Pow(math.Acos(x), DegreeAcos), DegreeNumerator/DegreeDenumenator))
}

func Lab4() {
var xn, xk, dx float64 = 0.22, 0.92, 0.14
var xv []float64 = []float64{0.1, 0.35, 0.4, 0.55, 0.6}
Lab4A(xn, xk, dx)
Lab4B(xv)
var xn, xk, dx float64 = 0.22, 0.92, 0.14
var xv []float64 = []float64{0.1, 0.35, 0.4, 0.55, 0.6}
Lab4A(xn, xk, dx)
Lab4B(xv)
}
16 changes: 9 additions & 7 deletions golang/main.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package main

import (
"isuct.ru/informatics2022/labs/lab4"
"isuct.ru/informatics2022/labs/lab6"
"isuct.ru/informatics2022/labs/lab7"
"fmt"

Check failure on line 4 in golang/main.go

View workflow job for this annotation

GitHub Actions / lint

"fmt" imported but not used (typecheck)

"isuct.ru/informatics2022/labs/lab4"
"isuct.ru/informatics2022/labs/lab6"
"isuct.ru/informatics2022/labs/lab7"
)

func main() {
lab4.Lab4()
lab6.Start6lab()
lab7.Start7lab()
}
lab4.Lab4()
lab6.Start6lab()
lab7.Start7lab()
}

0 comments on commit d3b2ea8

Please sign in to comment.