#include <stdio.h>
int main(void){ double light_speed = 300000; // ºûÀÇ ¼Óµµ¸¦ ÀúÀåÇÏ´Â º¯¼ö(300000km/sec) double distance = 149600000; // žç°ú Áö±¸ »çÀÌ °Å¸®¸¦ ÀúÀåÇÏ´Â º¯¼ö // 149600000km·Î ÃʱâÈÇÑ´Ù. int time,minute; // ½Ã°£À» ³ªÅ¸³»´Â º¯¼ö
time = distance / light_speed; // °Å¸®¸¦ ºûÀÇ ¼Óµµ·Î ³ª´«´Ù. minute = time % 60; time = time / 60; // Ãʸ¦ ºÐÀ¸·Î º¯È¯ÇÑ´Ù.
printf("ºûÀÇ ¼Óµµ´Â %.fkm/s \n", light_speed); printf("žç°ú Áö±¸¿ÍÀÇ °Å¸® %.fkm \n", distance); printf("µµ´Þ ½Ã°£Àº %dºÐ %dÃÊ\n", time,minute); // ½Ã°£À» Ãâ·ÂÇÑ´Ù.
return 0;}