Advertisement
HristoBaychev

toTheMoonKG

Oct 1st, 2021
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. #include <stdio.h>
  2.  int main()
  3.  {
  4.     double kilograms = 0;
  5.     double percentOfKilograms = 17;
  6.     double sum = 0;
  7.  
  8.      printf("Input your kilograms: ");
  9.      scanf("%lf", &kilograms);
  10.  
  11.      sum = (kilograms * percentOfKilograms) / 100;
  12.  
  13.      printf("Your kilograms on the moon is : %.2f", sum);
  14.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement