LauriFriberg

Newton2.cpp, counts the F in N, F=m*a, corrected.

Jun 9th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1. //Newton2.cpp
  2. //Made by Lauri K. Friberg on the day 9.6.2018 (9th of June), at 14:19 hours (2:19PM).
  3. //Newton.cpp, counts the Force (F) in Newtons(N) based on mass (m, kg, kilograms) and
  4. //acceleration (a, m/s/s=m/s²).
  5.  
  6. #include <iostream>
  7. using namespace std;
  8. int main(void)
  9. {
  10.     float F=0, m=79.8, a=9.81;
  11.     cout << "F = ma = ? N\n";
  12.     cout << "m(kg) = "; cout << m << " kg\n";
  13.     cout << "a(m/s/s) = a(m/s²) = "; cout << a << " m/s/s (m/s²)\n";
  14.     F = m * a;
  15.     cout << "F(Newton) = ma (kgm/s/s) = ma (kgm/s²) = " << F << " N (kgm/s²)" << " = " << F << " Newtons\n";
  16.  
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment