Guest User

Untitled

a guest
Feb 21st, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. #include <cstdlib>
  2. #include <iostream>
  3.  
  4. using namespace std;
  5. float b;
  6. float e;
  7. float f;
  8. void napisz()
  9. {
  10. puts("podaj tekst: ");
  11. char tekst[30];
  12. gets(tekst);
  13. cout<<"tekst ktory podales to: "<<tekst;
  14. puts("\n");
  15.  
  16. }
  17.  
  18. float kolo(float a)
  19. {
  20.  
  21. printf("Obwód to : %f ", 2*3.14*a);
  22. puts("\n");
  23. printf("Pole to: %f ", a*a*3.14);
  24. puts("\n");
  25. return a;
  26. }
  27. float kalk(float c,float d)
  28. {
  29. printf("Dodawanie : %f \n",c+d);
  30. printf("Odejmowanie : %f \n",c-d);
  31. printf("Dzielenie : %f \n",c/d);
  32. printf("Mnożenie : %f \n",c*d);
  33. }
  34. int main(int argc, char *argv[])
  35. {
  36. napisz();
  37. puts("podaj promien: ");
  38. cin>>b;
  39. puts("\n");
  40. kolo(b);
  41. puts("podaj 1 liczbe: \n");
  42. cin>>e;
  43. puts("podaj 2 liczbe: \n");
  44. cin>>f;
  45. kalk(e,f);
  46. system("PAUSE");
  47. return EXIT_SUCCESS;
  48. }
Add Comment
Please, Sign In to add comment