Sunday, July 17, 2022

Temperature Converter in C++

 A temperature converter that I wrote using C++ programming language which convert celsius to fahrenheit and fahrenheit to celsius.

 am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


Want to support my channel?

GCash Account

Jake Pomperada


09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.





Program Listing

/*

temp.cpp

Jake Rodriguez Pomperada,MAED-IT, MIT

www.jakerpomperada.com and www.jakerpomperada.blogspot.com

jakerpomperada@gmail.com

Bacolod City, Negros Occidental Philippines

*/


#include <iostream>

#include <iomanip>

#include <conio.h>


using namespace std;


int main()

{


int choice=0;

double temp=0, convert_temp=0;


cout <<"\n";

cout << "\tMAIN MENU\n";

cout << "\n [1] Fahrenheit To Celsius";

cout << "\n [2] Celsius To Fahrenheit";

cout << "\n\nEnter Your Choice : ";

cin >> choice;


if(choice == 1)

{

  cout << "\nGive Temperature in Fahrenheit : ";

  cin >> temp;

  convert_temp= (temp-32) / 1.8;

  cout << fixed << setprecision(2);

  cout << "\nThe Temperature in Celsius : " << convert_temp;

  }

  else

  {

  cout << "\nGive Temperature in Celsius : ";

  cin >> temp;

  convert_temp = (1.8 * temp) + 32;

   cout << fixed << setprecision(2);

  cout << "\nThe Temperature in Fahrenheit " << convert_temp;

  }

  cout <<"\n\n";

  cout << "\tEnd of Program";

  cout <<"\n\n";

  getch();

}



No comments:

Post a Comment