题解 | #浮点数的个位数字#
浮点数的个位数字
https://www.nowcoder.com/practice/ffa94d27c6534396aef38813535c279f
#include <stdio.h>
int main() {
float a;
a>0 ||a<=200;
scanf("%f",&a);
int b = (int)a;
int c;
if(b>=100)
{
c=(b-100)%10;
printf("%d",c);
}
else {
c=b%10;
printf("%d",c);
}
return 0;
}
