Tak i działa.
Przelicza normalnie, pokazuje się komunikat z informacją o obliczeniach.
Uciełam po prostu początek.
Teraz lepiej wygląda:
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <cmath>
#include <string>
using namespace std;
int main ()
{
int wybor;
cout<<" ---------------"<<endl;
cout<<" Zadanie nr 1 - <<endl;
cout<<" Zadanie nr 2 - <<endl;
cout<<" Zadanie nr 3 - <<endl;
cout<<" Zadanie nr 4 - <<endl;
cout<<" Zadanie nr 5 - <<endl;
cout<<" ---------------"<<endl;
cout<<" Wybierz numer zadania: ";
cin>>wybor;
cout<<" --------------"<<endl;
switch(wybor)
{case 5:
{
float stopnieC, stopnieF, stopnieC2, stopnieF2;
int wybor;
char again;
cout << "Funkcja, ktora konwertuje jednostki temperatur Celcjusza i Fahrenheita" << endl;
cout << "----------------------------------------------------------------------" << endl;
cout << endl;
cout << "[6] Z Celsjusza na Fahrenheita" << endl;
cout << "[7] Z Fahrenheita na Celsjusza" << endl;
cin >> wybor;
do {
switch( wybor )
case 6
:
{
cout << "Ile stopni: ";
cin >> stopnieC;
stopnieF =(( 9.0 / 5.0 ) * stopnieC + 32 );
cout << stopnieC << " stopni Celsjusza to = " << stopnieF << "stopni Fahrenheita" << endl;
cout << endl;
}
break;
case 7:
{
cout << "Ile stopni: ";
cin >> stopnieF2;
stopnieC2 = stopnieF2 * - 17, 22;
cout << stopnieF2 << " stopni Fahrenheita to = " << stopnieC2 << "stopni Celsjusza" << endl;
cout << "Czy powtorzyc zadanie/polecenie :
podany identyfikator nie istnieje ";
cin >> again;
}
break;
cout << "Czy powtorzyc zadanie/polecenie :
podany identyfikator nie istnieje ";
cin >> again;
}
while( again == 't' || again == 'T' );
}
}
break;
default:
cout << "Niepoprawny wybor, nie ma takiego zadania." << endl;
break;
}
return 0;