Write a C++ program that compute the given formula below
#include<iostream>
#include<math.h>
using namespace std;
int main()
{
//SqrtA+C*(D*E)-C/(F+G)*(H*J)
int A,C,D,E,F,G,H,J;
float x,y,z,m,n;
cout<<"Enter the interger A: ";
cin>>A;
cout<<"Enter the interger C: ";
cin>>C;
cout<<"Enter the interger D: ";
cin>>D;
cout<<"Enter the interger E: ";
cin>>E;
cout<<"Enter the interger F: ";
cin>>F;
cout<<"Enter the interger G: ";
cin>>G;
cout<<"Enter the interger H: ";
cin>>H;
cout<<"Enter the interger J: ";
cin>>J;
x=pow(A,0.5);
m=C*(D*E)-C;
n=x+m;
y=(F+G)*(H*J);
z=n/y;
cout<<"Result is: "<<z;
}
Comments
Leave a comment