সোমবার, ১৬ ফেব্রুয়ারী, ২০১৫

তাপমাত্রার সেলসিয়াস স্কেল থেকে ফারেনহাইট ও কেলভিন স্কেলে রূপান্তরের সি++ প্রোগ্রাম.

/*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.";
}