float totalPurchaseAmount, totalPurchaseTax,totalShippingCharge, totalShippingTax, totalGiftWrapCharge, totalGiftWrapTax, totalAmount;
int totalAmountCents;
totalAmount = totalPurchaseAmount + totalPurchaseTax + totalShippingCharge + totalShippingTax + totalGiftWrapCharge + totalGiftWrapTax ;
/* The %.2f formatting string limits the output to 2 decimal places */
lr_output_message("total %.2f", totalAmount);
lr_output_message("total %.2f",totalAmount );o/p=totalAmount = 569.97
totalAmountCents = totalAmount * 100;
lr_output_message("total cents %f",totalAmountCents);
o/p=totalAmountCents=56996
(But I need to print 56997 but not 56996, I mean the exact value but as an int)
How do I change the program so it effectively change the float to int?