Questions:
Celsius to Fahrenheit Converter
Code:
Output
Celsius to Fahrenheit Converter
Code:
// Celsius to Fahrenheit Converter
#include<iostream>
using namespace std;
//Prototype
float Celsius_to_Fahrenheit(float);
void main()
{
//Title
cout<<"\tCelsius to Fahrenheit Converter"<<endl<<endl;
float Celsius=0;
cout<<"Enter Celsius = ";
cin>>Celsius;
cout<<"Fahrenheit === "<<Celsius_to_Fahrenheit(Celsius)<<endl;
}
//Defination
float Celsius_to_Fahrenheit(float
Celsius){
return Celsius*1.8+32;
}
Output
Celsius to Fahrenheit Converter |
0 Questions:
Post a Comment