Hello I wrote this small. It takes a number fron 1 - 1024 rescales it and gives out a number between 1 - 363. But P_Number is a float. Is it possible to calculate P_Number as a float but only accept the integer part of the result. (e.g. if P_Number = 127.946) is it possible only to accept 127 or 128 and ignore the 0.946 part and send the integer result only to calculate DC. I don't really care if DC is a floating point number but I need the P_number to be an interger. If so can someone please show me how. I appreciate any help from anyone.
float P_Number, DC, A_Number;
printf("please enter the conversion number: ");
P_Number = (A_Number/1024)*363;
printf("The P_number is %f \n", P_Number);
DC = P_Number / 3.63;
printf("The DC is %f \n", DC);