For example:
Double k;
int n;
n =(int)k;
The function of n=(int)k is to assign the integer part of double type k to n.
If rounding is required when converting to an integer:
n =(int)k+0.5;