/* File: hello3.c More about Marvin and Earth. */ #include main() { int dm ; // dm is an integer variable double pi ; // pi is a floating point variable printf("Hello World\n") ; printf("My name is Marvin the Paranoid Android.") ; // no \n printf("I have brains the size of a planet.\n") ; dm = 7926 ; pi = 3.14159265 ; printf("\n\nHow big is that?\n") ; printf("The planet Earth has a diameter of %d miles at the equator\n", dm) ; printf("Which means the circumference of earth is about %f miles at the equator.\n", dm * pi ) ; printf("\n") ; printf("\n") ; printf("That's pretty big!\n") ; /* comments can go anywhere */ // single line comments using double slashes. printf("\n\nTo might find me (Marvin) working at Milliways") ; printf("(the Restaurant at the End of the Universe).\n") ; // Here 'End' refers to time, not location. }