Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <iomanip>
- #include <cstdlib>
- using namespace std;
- int main()
- {
- //const double pi=3.141592653589;
- char warunek;
- double a, b;
- double wynik;
- cout<<"podaj ktory podpunkt chcesz liczyc: a, b czy c"<<endl;
- cin>>warunek;
- switch (warunek)
- {
- case 'a': case 'A':
- cout << "podaj a i b: " << endl;
- cout << "a= ";
- cin>>a;
- cout << "b= ";
- cin>>b;
- cout << endl;
- wynik=sqrt( 7/( (pow(a,3))+cos( (M_PI*b) /180)) );
- cout << "wynik w podpunkcie a to: "<<fixed<<setprecision(6)<<wynik<< endl<< endl;
- break;
- case 'b': case 'B':
- cout << "podaj a i b: " << endl;
- cout << "a= ";
- cin>>a;
- cout << "b= ";
- cin>>b;
- cout << endl;
- wynik=sin( M_PI*(pow((a+b),4)/(sqrt(11)+1))/180 );
- cout << "wynik w podpunkcie b to: "<<fixed<<setprecision(6)<<wynik<< endl<< endl;
- break;
- case 'c': case 'C':
- cout << "podaj a: " << endl;
- cout << "a= ";
- cin>>a;
- cout << endl;
- wynik=pow( (cos(M_PI*(a+1)/180))/(sqrt(5)+3),3 );
- cout << "wynik w podpunkcie c to: "<<fixed<<setprecision(6)<<wynik<< endl<< endl<< endl;
- break;
- }
- system ("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement