Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- double Calc(double,double);
- int main() {
- double a,b;
- cout<<"a= ";
- cin>>a;
- cout<<"b= ";
- cin>>b;
- cout<<"Result: "<<Calc(a,b)<<endl;
- system ("pause");
- return 0;
- }
- double Calc(double a, double b){
- double x;
- x = 2*((a−b)/(b−a));
- return x;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement