题解 | 整数的十位
整数的十位
https://www.nowcoder.com/practice/031db23916904f4fad72198fe491b47b
#include <stdio.h>
int main() {
int a;
while (scanf("%d", &a) != EOF) { // 注意 while 处理多个 case
// 64 位输出请用 printf("%lld") to
if (a<10){
printf("%d",0);
}
else {
int b = a / 10;
int c = b %10;
printf("%d",c);
}
}
return 0;
}
查看15道真题和解析
