Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
|||
defmodule Temperature do
|
||||
def conversion(t) do
|
||||
IO.puts "K : #{f(t)}"
|
||||
IO.puts "\nC : #{f(t - 273.15)}"
|
||||
IO.puts "\nF : #{f(t * 1.8 - 459.67)}"
|
||||
IO.puts "\nR : #{f(t * 1.8)}"
|
||||
end
|
||||
|
||||
defp f(a) do
|
||||
Float.round(a, 2)
|
||||
end
|
||||
|
||||
def task, do: conversion(21.0)
|
||||
end
|
||||
|
||||
Temperature.task
|
||||
Loading…
Add table
Add a link
Reference in a new issue