Machine Problem in C++

Write a program in C++ to converts the given temperature measurements in Celsius to Fahrenheit. Use an looping statement, and an array for this program.

 I 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.

Program Listing

// temperature.cpp
// Jake Rodriguez Pomperada, MAED-IT, MIT
// www.jakerpomperada.blogspot.com and www.jakerpomperada.com
// jakerpomperada@gmail.com

/* Machine Problem in C++

Write a program in C++ to converts the given
temperature measurements in Celsius to Fahrenheit.
Use an looping statement, and an array for this
program.

*/


#include <iostream>

using namespace std;

int main()
{
  float celsius[] = {35.2, 26.3, 34.78, 19.34, 33.7};
  float fahrenheit=0.00;
 
 cout <<"\n\n";

cout << "\tThe temperature measurements in Celsius are:\n\n";
cout << "\t";
for (int a=0; a<5; a++) {
  cout <<a[celsius] << " ";
 }   

 cout <<"\n\n";
 
cout << "\tThe temperature measurements in Fahrenheit are:\n\n";
cout << "\t";
for (int a=0; a<5; a++) {
	 fahrenheit = (a[celsius] * 9.0) / 5.0 + 32;
   cout <<fahrenheit<< " ";
 }   
cout <<"\n\n";
cout << "\tEnd of Program";
cout <<"\n\n";
}
	
	

Leave a Reply

Your email address will not be published.