Kamis, 31 Juli 2025

C++ Fahrenheit ke Celius

 #include <iostream>


/* run this program using the console pauser or add your own getch, system("pause") or input loop */

using namespace std;


int main(int argc, char** argv) {

int celcius;

int fahrenheit;

cout<<"Enter temperature in Fahreheit";

cin>>fahrenheit;

cout<<endl;

celcius=5/9*(fahrenheit-32);

cout<<fahrenheit<<" degree F = "<<celcius<<" degree C "<<endl;

return 0;

}

Tidak ada komentar: