Answer to Question #238859 in C++ for USMAN

Question #238859
Can you write a C++ program that compute the given formula below sqrt{A+C∗(D∗E) /(F+G) ∗ (H∗J)}-C and request user name before computation
1
Expert's answer
2021-09-18T11:27:01-0400
#include<iostream>
#include<math.h>
using namespace std;
int main()
{
	//sqrt{A+C*(D*E) /(F+G) * (H*J)}-C
	string N;
	int A,C,D,E,F,G,H,J;
	float x,y,z,m,n;
	cout<<"Enter the user name: ";
	cin>>N;
	cout<<"Enter the value of A: ";
	cin>>A;
	cout<<"Enter the value of C: ";
	cin>>C;
	cout<<"Enter the value of D: ";
	cin>>D;
	cout<<"Enter the value of E: ";
	cin>>E;
	cout<<"Enter the value of F: ";
	cin>>F;
	cout<<"Enter the value of G: ";
	cin>>G;
	cout<<"Enter the value of H: ";
	cin>>H;
	cout<<"Enter the value of J: ";
	cin>>J;
	x=A+C*(D*E);
	y=(F+G)*(H*J);
	z=x/y;
	m=pow(z,0.5);
	n=m-C;
	cout<<"The result is: "<<n;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS