Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Anders Mundt Due
goplay
Commits
51c5bfd2
Commit
51c5bfd2
authored
Nov 08, 2018
by
Anders Mundt Due
Browse files
think that's the last error :)
parent
b9d976dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
cf/main.go
View file @
51c5bfd2
...
...
@@ -19,6 +19,6 @@ func main() {
f
:=
tempconv
.
Fahrenheit
(
t
)
c
:=
tempconv
.
Celcius
(
t
)
fmt
.
Printf
(
"%s = %s, %s = %s
\n
"
,
f
=
tempconv
.
FToC
(
f
),
c
,
tempconv
.
CToF
(
c
))
f
,
tempconv
.
FToC
(
f
),
c
,
tempconv
.
CToF
(
c
))
}
}
tempconv/conv.go
View file @
51c5bfd2
...
...
@@ -4,4 +4,4 @@ package tempconv
func
CToF
(
c
Celcius
)
Fahrenheit
{
return
Fahrenheit
(
c
*
9
/
5
+
32
)}
// FtoC convert Fahrenheit to Celcius
func
FToC
(
f
Fahrenheit
)
{
return
Celcius
((
f
-
32
)
*
5
/
9
)
}
func
FToC
(
f
Fahrenheit
)
Celcius
{
return
Celcius
((
f
-
32
)
*
5
/
9
)
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment