Answer to Question #269334 in C++ for Mulaudzi Muano

Question #269334

C++ full program that calculate the value of U. U=a+g*power(v,2) where g=constant

1
Expert's answer
2021-11-21T04:57:44-0500
#include<iostream>
#include<math.h>
using namespace std;
int main()
{
	float U=0, a, v, g=6.67408;
	cout<<"Enter the value of a:" ;
	cin>>a;
	cout<<"Enter the value of v:" ;
	cin>>v;
	
	U=a+g*pow(v,2);
	
	cout<<"U = "<<U;
	return 0;
	
}

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