25 lines
397 B
C
25 lines
397 B
C
#include "stdio.h"
|
|
#include "stdlib.h"
|
|
|
|
int main(){
|
|
|
|
int input;
|
|
printf("input:");
|
|
scanf("%d", &input);
|
|
|
|
// assume 3 digits,
|
|
|
|
int d1, d2, d3;
|
|
d1 = input / 100; //uitgaande van flooring
|
|
d2 = input % 100 / 10;
|
|
d3 = input % 10;
|
|
|
|
printf("%d%d%d",d3, d2,d1);
|
|
|
|
printf("next: ");
|
|
scanf("%1d%1d%1d", &d1,&d2,&d3);
|
|
printf("%d%d%d",d3,d2,d1);
|
|
|
|
return 0;
|
|
}
|