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);
}
}
미안.. 심심해서
막상 해보니까 안되서 간단한 디버그..