Advertisement
HristoBaychev

live in Jupiter input - sec

Oct 2nd, 2021
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.41 KB | None | 0 0
  1. #include <stdio.h>
  2.  int main()
  3.  {
  4. unsigned long long secToYears = 31536000;
  5. unsigned long long inputSec = 0;
  6. double changeToYears = 0;
  7. double jupiterL = 12;
  8. double totalLiveInJupiter = 0;
  9.  
  10. printf("Input desire sec: ");
  11. scanf("%d", &inputSec);
  12.  
  13. changeToYears = inputSec / secToYears;
  14.  
  15. totalLiveInJupiter = changeToYears / jupiterL;
  16.  
  17.  
  18. printf("Your years on Juputer is: %f", totalLiveInJupiter);
  19.  
  20.  
  21.  }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement