U E D R , A S I H C RSS

토이/숫자뒤집기/김남훈

No older revisions available

No older revisions available



#include <stdio.h>
#include <string.h>

const int MAX_BUF = 10;

void inverseNumber(const char * input);

int main(void) {
        char input[MAX_BUF];

        scanf("%s", input);

        inverseNumber(input);

        return 0;
}

void inverseNumber(const char * input) {
        int i;
        int len = strlen(input);

        for (i = len; i >= 0; i--)
                printf("%c", input[i]);

        printf("\n");
}


public class InverseNumber {
        public void inverse(String input) {
                char [] c = input.toCharArray();

                for (int i = c.length -  1; i >= 0; i--)
                        System.out.print(c[i]);

                System.out.println();
        }

        public void inverse(int input) {
                inverse("" + input);
        }
}
미안.. 심심해서 -_-

막상 해보니까 안되서 간단한 디버그..
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:31:21
Processing time 0.0199 sec