Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. double a, b, c;
  8. cout << "Podaj liczbe neutronow" << endl;
  9. cin >> a;
  10.  
  11. cout << "Podaj liczbe protonow" << endl;
  12. cin >> b;
  13.  
  14. cout << "Podaj mase" << endl;
  15. cin >> c;
  16.  
  17. double x = a*1,0086649 + b*1,0078250-c;
  18.  
  19. cout << "Deficyt masy w unitach -> " << x << endl;
  20. cout << "Deficyt masy w kg -> " << x / 1,66 << "* 10^-28kg" endl;
  21.  
  22.  
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement