The formula below describes Newton's second law of motion
Force = Mass x acceleration
Using the variables below Write one line of code that will calculate the acceleration of a object.
// Mass in Kg
float mass = 50.3;
// Froce in N
int force = 720;
//acceleration
float accel;
//One line of code to calculate the acceleration of a object
=
#include <iostream>
using namespace std;
int main(){
float mass=50.3;
int force=720;
float accel;
accel=force/mass;
cout<<"acceleration: "<<accel<<endl;
return 0;
}
Comments
Leave a comment