Ratio
Á¤¸® ¶ÇÁ·Î±×·¡¹ÖÀ» ÇÏ´Ù°¡ º¸¸é ƯÁ¤ scale ¹üÀ§ÀÇ °ªÀ» ÁöÁ¤ÇÑ scale ¹üÀ§¸¦ °®´Â °ªÀ¸·Î º¯È¯ÇÏ¿© »ç¿ëÇØ¾ß ÇÏ´Â °æ¿ì°¡ Á¾Á¾ ¹ß»ýÇÕ´Ï´Ù. Åë»óÀûÀ¸·Î ºñÀ²Àº ´ÙÀ½°ú °°ÀÌ Ç¥½ÃÇÕ´Ï´Ù.
x1 : x2 = y1 : y2 x1 * y2 = x2 * y1 x : 100 = value : max x * value = 100 * max x = ( 100 * value ) / max 20 : 100 = x : 500 20 * 500 = 100 * x x = ( 20 * 500 ) / 100 = 10000 / 100 = 100 void print_percent(long s_value, long s_max) { long long s_man; s_man = (((long long)s_value) * 10000ull) / s_max; (void)fprintf(stdout, "%llu.%02llu%%\n", s_man / 100ull, s_man % 100ull); } ÀÌ ¹Û¿¡µµ ºñÀ²°ø½ÄÀº ³Ê¹« ±¤¹üÀ§ÇÏ°Ô »ç¿ëµÇ¹Ç·Î ²À ¸Ó¸®¼Ó¿¡ »õ°Ü³Ö¾î¾ß ÇÏ´Â °ø½ÄÁß¿¡ ÇÑ°¡Áö¶ó°í ÁÖÀåÇÕ´Ï´Ù. |
You will receive a legacy which will place you above want. |