Create C++ full program that calculates the value of u. u=a+gv2
Hint: g must be constant
#include <iostream>
using namespace std;
const g = 10;
int main() {
float v,u,a;
cout<<"Enter velocity \n" ;
cin>> v ;
cout<<"Enter acceleration \n" ;
cin>> a ;
u = a + 2*g*v ;
cout<< u;
return 0;
}
Comments
Leave a comment