All pastes #61698 Raw Edit

Untitled

public text v1 · immutable
#61698 ·published 2006-06-04 13:23 UTC
rendered paste body
#include <iostream>

float licz(float);
float licz2(float);
#include <iostream>
using namespace std;
int main()
{
    int cos=0;
    int liczba;
    float tempcel;
    float tempfer;
    while (!cos)
    {
    cout << "\n1. Stopnie celcjusza - stopnie fahrenheita\n2. Stopnie fahrenheita - stopnie celcjusza\n";
    cin >> liczba;
    if ( liczba == 1)
    {
         cout << "\nWpisz temp w cel: ";
         cin >> tempcel;
         tempfer = licz(tempcel);
         cout << "\nTemp w fer to: " << tempfer;
         
     }
     else if ( liczba == 2)
     {
               cout << "\nWpisz temp w fer: ";
         cin >> tempfer;
         tempcel = licz(tempfer);
         cout << "\nTemp w cel to: " << tempcel;
     } else cos=1;
     }
     return 0;
     }
     
     float licz(float tempcel)
     {
           float tempfer;
           tempfer = (tempcel*1,8)+32;
           return tempfer;
           }
           
     float licz2(float tempfer)
     {
           float tempcel;
           tempcel = ((tempfer - 32)*5);
           return tempcel;
           }