Untitled

 avatar
unknown
plain_text
2 months ago
513 B
14
Indexable
#include <iostream>
#include <cmath>
using namespace std;

void CtoF(double &c) {
	c = (c * 9) / 5.0 + 32;
}
void FtoC(double& f) {
	f = (f - 32) * 5 / 9.0;
}
void PrintCF() {
	for (double i = 0; i < 101.0; i++) {
		cout << CtoF(i) << " ";
	}
	cout << endl;
	for (double i = 32; i < 212.0; i++) {
		cout << FtoC(i) << " ";
	}
	cout << endl;

}
int main() {
	double f, c;
	cin >> f >> c;
	CtoF(c);
	cout << c <<endl;
	FtoC(f);
	cout << f << endl;


	cout << endl;



	return 0;
}
Editor is loading...
Leave a Comment