/*Write a program that can convert temperature from Celsius
to Fahrenheit & Kelvin(Using only local variable and no user
defined function.).*/
#include<iostream.h>
void main()
{
float cel, frn,klvn; //Local variables
cout<<"Enter the value of temperature in Celsius : ";
cin>>cel;
frn=9*cel/5+32;
klvn=cel+273.15;
cout<<cel<<"°C = "<<frn<<" °F.\n";
cout<<cel<<"°C = "<<klvn<<" K.";
}
to Fahrenheit & Kelvin(Using only local variable and no user
defined function.).*/
#include<iostream.h>
void main()
{
float cel, frn,klvn; //Local variables
cout<<"Enter the value of temperature in Celsius : ";
cin>>cel;
frn=9*cel/5+32;
klvn=cel+273.15;
cout<<cel<<"°C = "<<frn<<" °F.\n";
cout<<cel<<"°C = "<<klvn<<" K.";
}