프로그래밍 패러다임

구조적 프로그래밍 structured programming

객체지향 프로그래밍 object-oriented programming

함수형 프로그래밍 functional programming

1. 구조적 프로그래밍

1) 탄생 배경

#include <stdio.h>

int main() {
    int num = 1;

    if (num == 1)
        goto target;

    printf("이 줄은 건너뛰어짐\\n");

target:
    printf("이 줄은 실행됨\\n");
    return 0;
}

2) 데이크스트라의 수학적 증명

코드를 작고 확실한 단위(모듈)로 나눈다.

각 단위가 올바르게 동작함을 논리적으로 증명할 수 있어야 한다.

이렇게 쌓인 단위들이 모여 전체 프로그램도 올바르게 동작하게 된다.