LauriFriberg

Newton.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.49 KB | None | 0 0
  1. //Made by Lauri K. Friberg on the day 9.6.2018 (9th of June), at 14:19 hours (2:19PM).
  2. //Newton.cpp, counts the Force (F) in Newtons(N) based on mass (n, kg, kilograms) and
  3. //acceleration (a, m/s/s=m/s²).
  4. #include <iostream>
  5. using namespace std;
  6. int main(void)
  7. {
  8.     float F=0, m=0, a=0;
  9.     cout << "F = ma = ? N\n";
  10.     cout << "m(kg) = "; cin >> m;
  11.     cout << "a(m/s/s) = a(m/s²) = "; cin >> a;
  12.     F=m*a;
  13.     cout << "F(Newton) = ma (kgm/s/s) = ma (kgm/s²) = " << F << "N (kgm/s²)\n";
  14.  
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment