20220203 º¹½À
     
-ÇÔ¼ö´Â y=f(x)ó·³ °ýÈ£ ¿­°í ´ÝÈù ¹®Àå, µ¿ÀûÀÎ °ÍÀ̶ó ÀÌÇØÇÏ¸é ½¬¿ò
if()´Â ÇÔ¼ö°¡ ¾Æ´Ï¶ó Á¦¾î¹®ÀÌ°í! main(),println()µîÀÌ ÇÔ¼ö!

-ÇÔ¼ö¸¦ Á÷Á¢ ¸¸µé¾îº¸ÀÚ.
ÇÔ¼ö´Â Ç×»ó class ¾ÈÂÊ¿¡ ÀÛ¼ºÇؾßÇÑ´Ù.
ÇÔ¼ö¸¦ ¸¸µé ¶§ Á÷Á¢ ½ÇÇàÇغ¸¸ç error ¹®±¸ È®ÀÎÇϸç ÀÛ¼ºÇÒ °Í.
1. return¿¡·¯ - main_menu();
2. missing method body ¿¡·¯ - void main_menu();
3. static ¿¡·¯ - static void main_menu();

mainÇÔ¼ö¿¡¼­ Á÷Á¢ ¸¸µç f1()ÇÔ¼ö¸¦ ºÒ·¯¿Í »ç¿ëÇÒ ¼ö ÀÖ´Ù.
f1()ÀÇ °á°ú°ªÀ» returnÇÏ¿© main ÇÔ¼ö·Î ºÒ·¯ ¿Ã ¼ö ÀÖ´Ù.
returnÇÒ ¶§¿¡ static µÚÀÇ void¸é ÇüÅ°¡ ¾ø´Â ÀÚ·áÇüÀÌ´Ï, int,String µîÀÇ ÀÚ·áÇü Àß ±âÀÔÇϱâ.
int result; µîÀ» ¼³Á¤ÇÏ¿© ÇÔ¼öf1()°ªÀ» °¡µÖ³õ°í È°¿ëÇÒ ¼öµµ ÀÖ´Ù.(¹«ÇÑÇÑ ÀÀ¿ë)

ex)ÁÖ¹®Ç¥¸¦ ¸¸µé ¶§¿¡ ¸Þ´º ÇÔ¼ö¸¦ ¹Ì¸® ¸¸µé¾î ³õ°í, ¸ÞÀÎ ÇÔ¼ö¸¦ ÀÛ¼ºÇÒ ¶§¿¡ ¸Þ´º ÇÔ¼öµéÀ» ºÒ·¯¿Í¼­
ÀÛ¼ºÇϸé Æí¸®ÇÔ. ¿¡·¯ ¹®±¸ µîÀ» Ãß°¡ÇÒ ¶§¿¡µµ ¿¡·¯ ³»¿ëÀ» ÇÔ¼ö·Î Á¤ÀÇÇØ ³õÀ¸¸é, ³ªÁß¿¡ ÀÏÀÏÈ÷ ¼öÁ¤ÇÒ ÇÊ¿äx

if¿Í else if¹®ÀÌ ³Ê¹« ¸¹¾ÆÁö¸é º¹ÀâÇØÁö¹Ç·Î ¸Þ´º ÇÁ·Î±×·¥¿¡¼­´Â switch¹®À» »ç¿ëÇÏ´Â °ÍÀÌ Æí¸®ÇÏ´Ù
switch (num)
     {
          case 1:
               menu1();
               break;
          case 2:
               menu2();
               break;
          default:
                exit();
     }

class T0203_20
{
     //f1(); Ãß»ó¸Þ¼­µå
     static int f1(int a,int b,int c,int d, int e){
          //¸ÞÀÎ ÇÔ¼ö·Î ´Ù½Ã °ªÀ» returnÇÒ·Á¸é static µÚ¿¡ ÀÚ·áÇü ¸í½Ã!!!
          //Á÷Á¢ ¸¸µç ÇÔ¼ö(class¾È¿¡ ¸¸µé±â!)///void´Â ÇüÅ°¡ ¾ø´Â ÀÚ·áÇü

           int total;
          total = a+b+c+d+e;
          
          return total;
     }


     public static void main(String[] args)
          //¸ÞÀÎ ÇÔ¼ö
     {
          int result;
          System.out.println("Hello World!");
          result=f1(1000,2000,3000,4000,5000);

          if (result<20000)
          {
                int cha;
                cha=20000-result;
                System.out.println(cha+"¿ø ¸¸Å­ ¼Õ½Ç");
          }


          System.out.println(f1(1000,2000,3000,4000,5000));
          //Ãâ·Â ÇÔ¼ö ( f1() )ÇØÁà¾ß ½ÇÇàÇßÀ» ¶§ Ãâ·Â°ª ³ª¿È!!!
     }
}