Problem S: 零起点学算法14——三位数反转
#include<stdio.h> #include<stdlib.h> int main() { int a,b,c,s; scanf("%d",&s); a=s/100; b=s%100/10; c=s%100%10; printf("%d%d%d",c,b,a); system("pause"); return 0; }
#include<stdio.h> #include<stdlib.h> int main() { int a,b,c,s; scanf("%d",&s); a=s/100; b=s%100/10; c=s%100%10; printf("%d%d%d",c,b,a); system("pause"); return 0; }