- <%@ Page Language="VB" %>
- <script runat="server">
- Function FahrToCent(Fahr As Double) As Double
- FahrToCent = (5.0/9.0)*(Fahr-32.0)
- End Function
-
- Function CentToFahr(Cent As Double) As Double
- CentToFahr = 1.8*Cent+32.0
- End Function
-
- Function CentToKelvin(Cent As Double) As Double
- CentToKelvin = Cent+273.16
- End Function
-
- Function KelvinToCent(Kelvin As Double) As Double
- KelvinToCent = Kelvin-273.16
- End Function
-
- Function KelvinToFahr(Kelvin As Double) As Double
- KelvinToFahr = 1.8*(Kelvin-273.16)+32.0
- End Function
-
- Function RankineToCent(Rankine As Double) As Double
- RankineToCent = (5.0/9.0)*(Rankine-491.69)
- End Function
-
- Function CentToRankine(Celsius As Double) As Double
- CentToRankine = (Celsius*1.8)+491.69
- End Function
-
- Function RankineToFahr(Rankine As Double) As Double
- RankineToFahr = Rankine-459.69
- End Function
-
- Function ReaumurToCent(Reaumur As Double) As Double
- ReaumurToCent = Reaumur*5/4
- End Function
-
- Function NewtonToCent(Newton As Double) As Double
- NewtonToCent = Newton*100/33
- End Function
- </script>
- <%
- Response.Write("0 Fahrenheit en Celsius: " & CStr(FahrToCent(0)) & "<BR>")
- Response.Write("32 Fahrenheit en Celsius: " & CStr(FahrToCent(32)) & "<BR>")
- Response.Write("80 Fahrenheit en Celsius: " & CStr(FahrToCent(80)) & "<BR>")
- Response.Write("<BR>")
- Response.Write("0 Celcius en Fahrenheit: " & CStr(CentToFahr(0)) & "<BR>")
- Response.Write("30 Celcius en Fahrenheit: " & CStr(CentToFahr(30)) & "<BR>")
- Response.Write("100 Celcius en Fahrenheit: " & CStr(CentToFahr(100)) & "<BR>")
- Response.Write("<BR>")
- Response.Write("-273,16 Celsius en Kelvin: " & CStr(CentToKelvin(-273.16)) & "<BR>")
- Response.Write("0 Celsius en Kelvin: " & CStr(CentToKelvin(0)) & "<BR>")
- Response.Write("100 Celsius en Kelvin: " & CStr(CentToKelvin(100)) & "<BR>")
- Response.Write("<BR>")
- Response.Write("0 Kelvin en Celsius: " & CStr(KelvinToCent(0)) & "<BR>")
- Response.Write("273,16 Kelvin en Celsius: " & CStr(KelvinToCent(273.16)) & "<BR>")
- Response.Write("373,16 Kelvin en Celsius: " & CStr(KelvinToCent(373.16)) & "<BR>")
- Response.Write("<BR>")
- Response.Write("0 Kelvin en Fahrenheit: " & CStr(KelvinToFahr(0)) & "<BR>")
- Response.Write("273,16 Kelvin en Fahrenheit: " & CStr(KelvinToFahr(273.16)) & "<BR>")
- Response.Write("373,16 Kelvin en Fahrenheit: " & CStr(KelvinToFahr(373.16)) & "<BR>")
- Response.Write("<BR>")
- Response.Write("0 Rankine en Celsius: " & CStr(RankineToCent(0)) & "<BR>")
- Response.Write("491,69 Rankine en Celsius: " & CStr(RankineToCent(491.69)) & "<BR>")
- Response.Write("671,69 Rankine en Celsius: " & CStr(RankineToCent(671.69)) & "<BR>")
- Response.Write("<BR>")
- Response.Write("-273,16 Celsius en Rankine: " & CStr(CentToRankine(-273.16)) & "<BR>")
- Response.Write("0 Celcius en Rankine: " & CStr(CentToRankine(0)) & "<BR>")
- Response.Write("100 Celcius en Rankine: " & CStr(CentToRankine(100.0)) & "<BR>")
- Response.Write("<BR>")
- Response.Write("0 Rankine en Fahrenheit: " & CStr(RankineToFahr(0)) & "<BR>")
- Response.Write("491,69 Rankine en Fahrenheit: " & CStr(RankineToFahr(491.69)) & "<BR>")
- Response.Write("671,69 Rankine en Fahrenheit: " & CStr(RankineToFahr(671.69)) & "<BR>")
- Response.Write("<BR>")
- Response.Write("0 Réaumur en Celsius: " & CStr(ReaumurToCent(0)) & "<BR>")
- Response.Write("80 Réaumur en Celsius: " & CStr(ReaumurToCent(80)) & "<BR>")
- Response.Write("100 Réaumur en Celsius: " & CStr(ReaumurToCent(100)) & "<BR>")
- Response.Write("<BR>")
- Response.Write("0 Newton en Celsius: " & CStr(NewtonToCent(0)) & "<BR>")
- Response.Write("100 Newton en Celsius: " & CStr(NewtonToCent(100)) & "<BR>")
- Response.Write("200 Newton en Celsius: " & CStr(NewtonToCent(200)) & "<BR>")
- %>
|
- <%@ Page Language="C#" %>
- <script runat="server">
- static double FahrToCent(double Fahr) {
- return (5.0/9.0)*(Fahr-32.0);
- }
-
- static double CentToFahr(double Cent) {
- return 1.8*Cent+32.0;
- }
-
- static double CentToKelvin(double Cent) {
- return Cent+273.16;
- }
-
- static double KelvinToCent(double Kelvin) {
- return Kelvin-273.16;
- }
-
- static double KelvinToFahr(double Kelvin) {
- return 1.8*(Kelvin-273.16)+32.0;
- }
-
- static double RankineToCent(double Rankine) {
- return (5.0/9.0)*(Rankine-491.69);
- }
-
- static double CentToRankine(double Celsius) {
- return (Celsius*1.8)+491.69;
- }
-
- static double RankineToFahr(double Rankine) {
- return Rankine-459.69;
- }
-
- static double ReaumurToCent(double Reaumur) {
- return Reaumur*5/4;
- }
-
- static double NewtonToCent(double Newton) {
- return Newton*100/33;
- }
- </script>
- <%
- Response.Write("0 Fahrenheit en Celsius: " + FahrToCent(0) + "<br />");
- Response.Write("32 Fahrenheit en Celsius: " + FahrToCent(32) + "<br />");
- Response.Write("80 Fahrenheit en Celsius: " + FahrToCent(80) + "<br />");
- Response.Write("<br />");
- Response.Write("0 Celcius en Fahrenheit: " + CentToFahr(0) + "<br />");
- Response.Write("30 Celcius en Fahrenheit: " + CentToFahr(30) + "<br />");
- Response.Write("100 Celcius en Fahrenheit: " + CentToFahr(100) + "<br />");
- Response.Write("<br />");
- Response.Write("-273.16 Celsius en Kelvin: " + CentToKelvin(-273.16) + "<br />");
- Response.Write("0 Celsius en Kelvin: " + CentToKelvin(0) + "<br />");
- Response.Write("100 Celsius en Kelvin: " + CentToKelvin(100) + "<br />");
- Response.Write("<br />");
- Response.Write("0 Kelvin en Celsius: " + KelvinToCent(0) + "<br />");
- Response.Write("273,16 Kelvin en Celsius: " + KelvinToCent(273.16) + "<br />");
- Response.Write("373,16 Kelvin en Celsius: " + KelvinToCent(373.16) + "<br />");
- Response.Write("<br />");
- Response.Write("0 Kelvin en Fahrenheit: " + KelvinToFahr(0) + "<br />");
- Response.Write("273,16 Kelvin en Fahrenheit: " + KelvinToFahr(273.16) + "<br />");
- Response.Write("373,16 Kelvin en Fahrenheit: " + KelvinToFahr(373.16) + "<br />");
- Response.Write("<br />");
- Response.Write("0 Rankine en Celsius: " + RankineToCent(0) + "<br />");
- Response.Write("491,69 Rankine en Celsius: " + RankineToCent(491.69) + "<br />");
- Response.Write("671,69 Rankine en Celsius: " + RankineToCent(671.69) + "<br />");
- Response.Write("<br />");
- Response.Write("-273,16 Celsius en Rankine: " + CentToRankine(-273.16) + "<br />");
- Response.Write("0 Celcius en Rankine: " + CentToRankine(0) + "<br />");
- Response.Write("100 Celcius en Rankine: " + CentToRankine(100.0) + "<br />");
- Response.Write("<br />");
- Response.Write("0 Rankine en Fahrenheit: " + RankineToFahr(0) + "<br />");
- Response.Write("491,69 Rankine en Fahrenheit: " + RankineToFahr(491.69) + "<br />");
- Response.Write("671,69 Rankine en Fahrenheit: " + RankineToFahr(671.69) + "<br />");
- Response.Write("<br />");
- Response.Write("0 Réaumur en Celsius: " + ReaumurToCent(0) + "<br />");
- Response.Write("80 Réaumur en Celsius: " + ReaumurToCent(80) + "<br />");
- Response.Write("100 Réaumur en Celsius: " + ReaumurToCent(100) + "<br />");
- Response.Write("<br />");
- Response.Write("0 Newton en Celsius: " + NewtonToCent(0) + "<br />");
- Response.Write("100 Newton en Celsius: " + NewtonToCent(100) + "<br />");
- Response.Write("200 Newton en Celsius: " + NewtonToCent(200) + "<br />");
- %>
|