Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Commit

Permalink
JavaScript program to convert temperature from celsius to kelvin (#5589)
Browse files Browse the repository at this point in the history
Co-authored-by: Anandha Krishnan S <anandajith@gmail.com>
Co-authored-by: Harsh Raj <harshraj8843@gmail.com>
  • Loading branch information
3 people authored Mar 28, 2024
1 parent 378c0b9 commit 22a0e62
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
function celsiusToKelvin(celsius) {
return celsius + 273.15;
}

const celsius = -40;
const kelvin = celsiusToKelvin(celsius);

console.log(`Input (C): ${celsius}`);
console.log(`Output (K): ${kelvin}`);

1 comment on commit 22a0e62

@vercel
Copy link

@vercel vercel bot commented on 22a0e62 Mar 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.