[ create a new paste ] login | about

Link: http://codepad.org/JW0EvEFW    [ raw code | output | fork ]

nel - C, pasted on Feb 7:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stdio.h>
#include <math.h>

int main(void)
{

    double n = 126.23;
    int t, j;

    t = floor(n/10);
    j = (n - t*10);

    printf("%d", j);

    return 0;

}


Output:
1
6


Create a new paste based on this one


Comments: