연산자++, --의 사용 및while 순환 테스트의 용도

1701 단어 while
전++와 후++의 차이점:
b=3+(++a);//a=a+1;b=3+a;
b=3+(a++);//b=3+a;a=a+1;
     
                while (true)(     ,           )
            {
                Console.Write("     a:");
                int a = int.Parse(Console.ReadLine());————    string       int    
                Console.Write("     b:");
                int b = int.Parse(Console.ReadLine());————    string       int    
                b = 5 + (a++);
                Console.WriteLine(a);
                Console.WriteLine(b);
                b = 5 + (++a);
                Console.WriteLine(a);
                Console.WriteLine(b); 
                Console.ReadLine();
            }

 
콘솔 인터페이스: 숫자 a:1을 입력하십시오.
숫자 b:2를 입력하세요
                 2
                 6
                 3
                 8

좋은 웹페이지 즐겨찾기