Code:

__temperature.h__
#ifndef TEMPERATURE_H
#define TEMPERATURE_H
double FtoC(double); // c = (5/9) * (f –32)
//Function FtoC() return temperature by converting Fahrenhiet to Celsius
double KtoC(double); // c = k – 273.2
//Function KtoC() return temperature by converting Kelvin to Celsius
/*
double CtoK(double); // k = c + 273.2
//Function CtoK() return temperature by converting Celsius to Kelvin
double CtoF(double); // f = (9/5) * c + 32
//Function CtoF() return temperature by converting Celsius to Fahrenhiet
*/
void tableheading();
//Create Table Heading
#endif
**DONE BY F1uT3**

Code:

__temperature.cpp__
#include"temperature.h"
#include <iostream>
#include <iomanip>
using std::cout;
using std::setw;
//Function Definitions
//Functions of temperatures by using Celsius as a base for converting to Fahrenheit and Kelvin.
/*
double FtoC(double f) // Function for converting Fahrenheit to Celsius
{
return (f-32)*5.0/9;
}
double KtoC(double k) // Function for converting Kelvin to Celsius
{
return (k–273.2);
}*/
double CtoK(double c) // Function for converting Celsius to Kelvin
{
return c+273.2;
}
double CtoF(double c) // Function for converting Celsius to Fahrenheit
{
return 9.0/5*c+32;
}
void tableheading()
{
//Print a table heading
cout<<"******************************";
cout<<setw(8)<<"\nCelsius|"
<<setw(12)<<"Fahrenheit|"
<<setw(8)<<" Kelvin |"
<<setw(8)<<"Celsius|"
<<setw(8)<<"Celsius|"
<<setw(8)<<"Celsius|";
cout<<setw(8)<<"\nC_Base|"
<<setw(12)<<"C_Base2F |"
<<setw(8)<<"C_Base2K|"
<<setw(12)<<"K_Base2C|"
<<setw(12)<<"F_Base2C|"
<<setw(8)<<"C_Base|";
cout<<"\n******************************\n";
}
**DONE BY F1uT3**

Code:

__temptable.cpp__
/*Write a program to display a nice table of temperatures showing temperature values of Celsius,
Kelvin and Fahrenheit for Celsius values of ranging from –50 to + 150 utilizing the library.*/
#include"temperature.h"
#include <iostream>
#include <iomanip>
using std::cout;
using std::cin;
using std::endl;
using std::setw;
using std::setprecision;
using std::fixed;
int main()
{
//========Declare Variables========
double c,f,k,c2f,c2k,f2c,k2c;
double lowest_c=-50;
double highest_c=150;
double step_size=1;
//========Display A Welcome Statement========
cout<<"TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT"<<endl;
cout<<"-------- This is a program , a conversion table of temperatures(C,F,K). --------"<<endl;
cout<<"TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT"<<endl;
//========Display A Table of Temperatures========
tableheading();
for(c=lowest_c ; c<=highest_c ; c+=step_size)
{
cout<<setw(5)<<setprecision(0)<<c;
c2f=CtoF(c);
cout<<setw(12)<<fixed<<setprecision(2)<<c2f;
c2k=CtoK(c);
cout<<setw(10)<<fixed<<setprecision(2)<<c2k;
/*for(k=223.20 ; k<=423.20 ; k+=step_size)
{
k2c=KtoC(k);
cout<<setw(10)<<fixed<<setprecision(2)<<k2c;
}
for(f=102.00 ; f<=302.00 ; f+=step_size)
{
f2c=FtoC(f);
cout<<setw(12)<<fixed<<setprecision(2)<<f2c;
}
cout<<setw(5)<<setprecision(0)<<c;*/
if(c==-10 || c==30 || c==70 || c==110) //Fix the number shown every pages
{
cout<<"\nPress Enter to continue ...";
cin.get(); //get Enter key to continue
tableheading();
}
}
return 0;
}
**DONE BY F1uT3**