题解 | #浮点数的个位数字#
浮点数的个位数字
http://www.nowcoder.com/practice/ffa94d27c6534396aef38813535c279f
#include <stdio.h>
int main()
{
float num1 = 0;
int num2 = 0;
scanf("%f",&num1 );
num2 = (int)num1;//强制类型转换
num2 %= 10;
printf("%d",num2);
return 0;
}