Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2015
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4. int main(){
  5. /*double a,b,sum,sub,div,mul;
  6. cout<<"Enter 2 values:";
  7. cin>>a>>b;
  8.  
  9. cout<<"a="<<a;
  10. cout<<"\nb="<<b;
  11.  
  12. sum=a+b;
  13. sub=a-b;
  14. mul=a*b;
  15. div=a/b;
  16.  
  17.  
  18. cout<<"\na+b="<<sum;
  19. cout<<"\na-b="<<sub;
  20. cout<<"\na/b="<<div;
  21. cout<<"\na*b="<<mul;
  22.  
  23.  
  24. cin.get(); cin.get();
  25. return 0;}*/
  26.  
  27. /*double a,b,c,P;
  28. cout<<"Enter a,b and c:";
  29. cin>>a>>b>>c;
  30. P=(a+b-c)/2;
  31.  
  32. cout<<"P="<<P;
  33.  
  34. cin.get(); cin.get();
  35. return 0;}
  36.  
  37.  
  38. double a,b,c,R;
  39. cout<<"Enter a,b and c:";
  40. cin>>a>>b>>c;
  41. R=sqrt(pow(a+b,3))+pow(a,7)-c;
  42. cout<<"The result Is: "<<R;
  43.  
  44.  
  45. }*/
  46.  
  47.  
  48. double x,y,a,b,c;
  49. cout<<"Enter The Values of a, b and c:";
  50. cin>>a>>b>>c;
  51. x=(a+b)*3+pow(c,5);
  52. y=(sqrt(a)+3)/6;
  53. cout<<"the value of x: "<<x;
  54. cout<<"\nthe value of y: "<<y;
  55.  
  56. cin.get();
  57. cin.get();
  58. return 0;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement