Advertisement
Guest User

Untitled

a guest
Oct 21st, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int figura=1;
  8. int a=2,b=3;
  9. int pole, obwod;
  10.  
  11. cout << "dlugosc pierwszego boku wynosi: "<<endl;
  12.  
  13. cout << "dlugosc drugiego boku wynosi: "<<endl;
  14.  
  15.  
  16. switch (1)
  17. {
  18. case 1:
  19. if (a==b)
  20. {
  21. pole=a*a;
  22. obwod=(2*a)+(2*b);
  23.  
  24. cout << "Pole jest równe " << pole << "a obwod jest rowny " << obwod<<endl;
  25.  
  26. else
  27.  {
  28. pole=a*b;
  29. obwod=(2*a+2*b);
  30.  
  31. cout << "Pole jest równe " << pole << "a obwod jest rowny " << obwod<<endl;
  32. }
  33. break;
  34.  
  35. }
  36.  
  37.  
  38.  
  39.  
  40.  
  41. return 0;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement