Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <iomanip>
- using namespace std;
- int minutesPassed(int minute, int hour, int day) {
- return minute + 60 * hour + 1440 * day;
- }
- double celsToFar(double celsius){
- return celsius * 1.8 + 32.0;
- }
- double farToCels(double farenheit){
- return (farenheit -32.0) / 1.8;
- }
- void cToFChart (){
- cout << "Celsius Farenheit" << endl;
- //setw 4 setw 13
- for(double cels{1.0}; cels <= 100.0; cels++){
- cout << setw(4) << cels << setw(13) << celsToFar(cels) << endl;
- }
- }
- void fToCChart (){
- cout << fixed << setprecision(2);
- cout << "Farenheit Celsius" << endl;
- //setw 4 setw 13
- for(double far{32.0}; far <= 212.0; far++){
- cout << setw(8) << far << setw(12) << farToCels(far) << endl;
- }
- }
- int main()
- {
- fToCChart ();
- //cToFChart();
- //cout << minutesPassed(6, 12, 10);
- //cout << celsToFar(17.0) << endl;
- //cout << farToCels(62.6);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement