Write a program in C++ to convert temperature in Celsius to Fahrenheit
Write a program in C++ to convert temperature in Celsius to Fahrenheit
Solution:
#include <iostream>
using namespace std;
int main()
{
float frh, cel;
cout << "\n\n Convert temperature in
Celsius to Fahrenheit :\n";
cout << "
----------------------------\n";
cout << " Input the temp in Celsius : ";
cin >> cel;
frh = (cel * 9.0) / 5.0 + 32;
cout << " The temp in Celsius: "
<< cel << endl;
cout << " The temperature in Fahrenheit :
" << frh << endl;
cout << endl;
return 0;
}
Để thảo luận về các vấn đề trong bài viết này, mời các bạn tham gia nhóm facebook https://fb.com/groups/divindev/