c_4
안녕하세요 대학생개발자입니다. 이번글에서는 반복문에 대해서 간단히 알아보겠습니다. 반복문이란 말 그대로 코드가 반복되는 구간을 의미하는거겠죠... 그리고 거의 모든 반복에는 조건이 있습니다. 우선 반복문에 어떤것들이 있는지부터 봐야할 것 같습니다. 첫번째로 for문이 있습니다. 두번째로 while문이 있습니다. 세번째로 do while문이 있습니다. 먼저 조건문에 공통적으로 들어가는 구성에 대한 얘기를 먼저 해보겠습니다. 1. 초기식 2. 조건식 3. 증감식 조건식에는 위의 세가지 구성이 들어가는데요. 초기식의 경우에는 말그대로 조건식에서 사용될 값을 초기화 해주는 부분입니다. 초기화되지 않은 값을 사용하게되면 visual studio에서는 컴파일 에러를 뱉어주지만 그외 다른 컴파일러에서는 에러를 뱉어주..
2022.05.10