Advertisement
ItzEdInYourBed

Untitled

May 14th, 2020
1,156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. int main() {
  4.  
  5.   double tempf;
  6.   double tempc;
  7.  
  8.   // Ask the user
  9.   std::cout << "Enter the temprature in Fahrenheit: ";
  10.   std::cin >> tempf;
  11.  
  12.  
  13.   tempc = (tempf - 32) / 1.8;
  14.  
  15.   std::cout << "The temp is " << tempc << " degrees Celsius.\n";
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement