PatrickSwayze

zad 1 kalk

Dec 18th, 2017
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.31 KB | None | 0 0
  1. #include<iostream>
  2. #include<cmath>
  3. #include<cstdlib>
  4. #include<time.h>
  5. #include "pliki.cpp"
  6.  
  7. #define PI 3.1415
  8. using namespace std;
  9.  
  10.  
  11. int main()
  12. {
  13. // zad 1,5,8
  14. srand(time(NULL));
  15. float stopnie,a,b,n;
  16. cout<<"Dodawanie podaj a i b"<<endl;
  17. cin>>a>>b;
  18. kalkulator::dodawanie(a,b);
  19. cout<<endl<<"Odejmowanie podaj a i b"<<endl;
  20. cin>>a>>b;
  21. kalkulator::odejmowanie(a,b);
  22. cout<<endl<<"mnozenie podaj a i b"<<endl;
  23. cin>>a>>b;
  24. kalkulator::mnozenie(a,b);
  25. cout<<endl<<"dzielenie podaj a i b"<<endl;
  26. cin>>a>>b;
  27. kalkulator::dzielenie(a,b);
  28. cout<<endl<<"Teraz uzupelnie tablice losowymi wartosciami podaj ilosc liczb w tablicy "<<endl;
  29. cin>>n;
  30. kalkulator::randomowa_tablica(n);
  31. cout<<endl<<"Teraz sinus, podaj stopnie"<<endl;
  32. cin>>stopnie;
  33. kalkulator::sinus(stopnie);
  34. cout<<endl<<"Teraz cosinus, podaj stopnie"<<endl;
  35. cin>>stopnie;
  36. kalkulator::cosinus(stopnie);
  37. cout<<endl<<"Teraz tangens, podaj stopnie"<<endl;
  38. cin>>stopnie;
  39. kalkulator::tangens(stopnie);
  40.  
  41.  
  42. return 0;
  43. }
  44.  
  45. /* 1.   Zdefiniuj przestrzeñ nazw „kalkulator” a w
  46.  niej zaimplementuj funkcje wykonuj¹ce oepracje arytmetyczne,
  47.   generowanie losowej tablicy liczb rzeczywistych z przedzia³u
  48.    <-2,3), obliczaj¹ce wartoœæ sin, cos i tg dla miary
  49.    stopniowej. Napisz program, w którym ta przestrzeñ nazw
  50.    bêdzie u¿yteczna. U¿yj j¹.*/
Advertisement
Add Comment
Please, Sign In to add comment