KONVERSI SUHU dalam celcius

Saya akan membagikan kembali source code untuk mencari konversi suhu dalam celcius.



#include <iostream>
#include <string>
using namespace std;
int main()
{
   int p;
   double r, f, k, c, i;  
   cout << "masukan banyak perulangan : ";
   cin >> p;
   cout<<endl<<endl;
   i =0;
   while (!(i==p))
   {     
      cout << "masukan nilai suhu dalam celcius = ";
      cin >> c;
      r =0.8*c;
      f =1.8*c+32;
      k =c+273;
      cout<<endl;
      cout << c<<" derajat celcius = "<<endl;
      cout << "\t*"<<r<<" derajat reamur\n";
      cout << "\t*"<<f<<" derajat farenheit\n";
      cout << "\t*"<<k<<" derajat kelvin\n";
      cout<<endl<<endl;
              i =i+1;
             
   }

   return 0;
}

sekian dan sampai bertemu kembali
Share on Google Plus

About Luthfi

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 komentar:

Posting Komentar