Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[참고] 3주차 실습(재귀) 문제 2 #10

Closed
GzuPark opened this issue Apr 20, 2020 · 0 comments
Closed

[참고] 3주차 실습(재귀) 문제 2 #10

GzuPark opened this issue Apr 20, 2020 · 0 comments

Comments

@GzuPark
Copy link

GzuPark commented Apr 20, 2020

#include <stdio.h>

void rprint(int n){
    if (n < 10) printf("%d\n", n%10);
    else {
        rprint(n/10);
        printf("%d\n", n%10);
    }
}

int main(void) {

    int N;
    scanf("%d", &N);

    rprint(N);

}

// 17011836
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant