Create C++ full program that calculates the value of u. u=a+gv^2
#include <iostream>
using namespace std;
int main(){
double u;
double a;
double v;
const double g=9.8;
cout<<"Enter a: ";
cin>>a;
cout<<"Enter v: ";
cin>>v;
u=a+g*v*v;
cout<<"u = "<<u;
cin>>v;
return 0;
}
Comments
Leave a comment