All pastes #898509 Raw Edit

Miscellany

public cpp v1 · immutable
·published 2008-02-10 11:58 UTC
rendered paste body
#include <iostream>using namespace std;int main(){        cout << "Wpisz temperature poczatkowa: ";        float t;        cin >> t;        cout << "\n\nC - z Celsjusza na Fahrenheita\nF - z Fahrenheita na Celsjusza\n";        char cf;        cin >> cf;        float t2;        switch(cf)        {                case 'C':                        t2 = (t * 1.8) + 32;                        cout << "\nW Fahrenheitach to: " << t2;                        break;                case 'F':                        t2 = (t - 32) * 0.555;                        cout << "\nW Celsjuszach: " << t2;                        break;                default:                        cout << "\nCos Ci sie pomylilo.\n";                        break;        }        cout << '\n';        return 0;}