Advertisement
jacob_segundo

fahrenheit celsius cpp

Mar 17th, 2021
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1.  
  2. #include<iostream>
  3. using namespace std;
  4. int main(){
  5.     float f, fahrenheit, celsius;
  6.     cout<<"entre com a temperatura em Fahrenheit:\n";
  7.     cin>>fahrenheit;
  8.     f=fahrenheit-32;
  9.     celsius=f/1.8;
  10. std::cout.precision(4);
  11.     cout<<"a temperatura em celsius e:"<<celsius;
  12.    
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement