Calculate the light year between Jupiter and Sun - C Data Type

C examples for Data Type:long

Description

Calculate the light year between Jupiter and Sun

Demo Code

#include <stdio.h>
int main()/* ww  w  . ja  va 2  s  .  c om*/
{
   float lightyear=5.878E12;
   float jupiter=483400000;
   float distance;
   distance=jupiter/lightyear;
   printf("Jupiter is %f light years from the sun.\n",distance);
   return(0);
}

Result


Related Tutorials