(adsbygoogle = window.adsbygoogle || []).push({ google_ad_client: "ca-pub-2960223314593660", enable_page_level_ads: true }); Program to print fractional and integer part of a floating point - TecGlance

Header Ads

Program to print fractional and integer part of a floating point



======== INTEGER PART AND FRACTIONAL PART===========



 a=input("Enter The Floating Point Number :")

 f=a%1

 i=a//1

 print "Integer Part is :",i

 print " Fractional   Part is :",f





================ OUTPUT ==========================



 Enter The Floating Point Number12.458

 Integer Part is : 12

 Fractional   Part is : 0.458



===================================================

No comments

Powered by Blogger.