# Celsius To Fahrenheit Converter Using JavaScript

This is a simple tutorial that we are going to learn today. And it's called Celsius To Fahrenheit Converter Using JavaScript. If you want to do this manually. First, you have the method to convert the Celsius to Fahrenheit. You have to take time for solving.

But if you have this program, you don't need to do this manually to get the Celsius to Fahrenheit.

Kindly type a value in the box then it will automatically view the result.

JavaScript

This is the script to get the result of Celsius to Fahrenheit.

`<script type="text/javascript" src="angular.min.js"></script> <script>    var app = angular.module('celsiusTofahrenheit', []);    app.filter('single_inDecimal', function(\$filter) {        return function(input) {            if (isNaN(input)) return input;            return Math.round(input * 10) / 10;        };    });    app.filter('setDecimal', function(\$filter) {        return function(input, places) {            if (isNaN(input)) return input;            var factor = "1" + Array(+(places > 0 && places + 1)).join("0");            return Math.round(input * factor) / factor;        };    });    app.controller('Ctrl', function(\$scope) {        \$scope.val = 1.56;    });</script>`

HTML

This is the HTML code to input the user the value to convert and to see automatically the result.

`<center>   <h3>Celsius To Fahrenheit Converter</h3>   <div ng-app="celsiusTofahrenheit">      <p>Temperature in Celsius:</p>      <hr />      <input type="number" step="1" autofocus="autofocus" ng-model="code_fahrenheit" maxlength="5" size="3"/>      <hr />      <p>The temperature in Celsius is <b style="color:blue;"> {{ code_fahrenheit }}&deg;C </b> its equivalent to Fahrenheit is <b style="color:blue;"> {{ (code_fahrenheit * 9/5) + 32 | setDecimal:1}}&deg;F</b>.</p>   </div></center>`

So what can you say about this work? Share your thoughts in the comment section below or email me at [email protected]. Practice Coding. Thank you very much.

### Tags

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.