Skip to content

Instantly share code, notes, and snippets.

@ninpl
Created March 16, 2017 17:29
Show Gist options
  • Save ninpl/17f66f01c90c8fdadb91b80c82dd94c7 to your computer and use it in GitHub Desktop.
Save ninpl/17f66f01c90c8fdadb91b80c82dd94c7 to your computer and use it in GitHub Desktop.
Cambia los grados de Celsius a Fahrenheit y a Kelvin
#include <iostream>
using namespace std;
int main()
{
// Cambia los grados de Celsius a Fahrenheit y a Kelvin
float celsius,fahrenheit,kelvin;
cout<<"Ingrese los grados celsius:";
cin>>celsius;
fahrenheit = ((celsius*9)/5)+32;
kelvin = celsius + 273.15;
cout<<"Los grados en kelvin es "<<kelvin<<endl;
cout<<"Los grados en fahrenheit es "<<fahrenheit<<endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment