Advertisement
Guest User

123

a guest
Jan 23rd, 2017
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include <iostream>
  2. #include<cmath>
  3. #include<cstdlib>
  4. using namespace std;
  5.  
  6. void f1(float x,float &x1,float &x2, float &x3)
  7. {
  8. x1=abs(x);
  9. x2=sqrt(x);
  10. x3=pow(x,2);
  11.  
  12.  
  13. }
  14.  
  15. int main()
  16. {
  17. float x, x1, x2, x3;
  18.  
  19. cout<<"Enter x \n";
  20. cin>>x;
  21. f1(x,x1,x2);
  22. cout<<"x1="<<x1<<endl;
  23. cout<<"x2="<<x2<<endl;
  24. cout<<"x3="<<x3<<endl;
  25. system("pause");
  26.  
  27.  
  28.  
  29. return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement