15 lines
222 B
C
15 lines
222 B
C
|
#include <stdio.h>
|
||
|
|
||
|
int main(void)
|
||
|
{
|
||
|
float f=123.767;
|
||
|
int k, fint;
|
||
|
fint = f; //fint = 123
|
||
|
fint *= 10; //fint = 1230
|
||
|
f = f*10; //f = 1235.67
|
||
|
k = f - fint; //k=5
|
||
|
printf ("%d",k);
|
||
|
return 0;
|
||
|
}
|
||
|
|