Computer program for reverse a floating or decimal point number.

1128 views 1 replies

https://www.programmingsimplified.com/c/source-code/c-program-reverse-number

Writing a computer program which will reverse a decimal or floating point number.

Example :

Input : 341.58

Output : 85.143

Writing the computer program in C,C++,Java,C# & Python programming languages.

Thanks & Regards,

Prashant S Akerkar

 

 

Replies (1)

Decimals have much higher precision and are usually used within financial applications that require a high degree of accuracy. Decimals are much slower (up to 20X times in some tests) than a double/float. Decimals and Floats/Doubles cannot be compared without a cast whereas Floats and Doubles can. Decimals also allow the encoding or trailing zeros.

Float - 7 digits (32 bit)

Double-15-16 digits (64 bit)

Decimal -28-29 significant digits (128 bit)

The main difference is Floats and Doubles are binary floating point types and a Decimal will store the value as a floating decimal point type. So Decimals have much higher precision and are usually used within monetary (financial) applications that require a high degree of accuracy. But in performance wise Decimals are slower than double and float types.

 

 


CCI Pro

Leave a Reply

Your are not logged in . Please login to post replies

Click here to Login / Register  

Company
ARTICLESHIP 27 May 2026
CA Article Trainee

Rahul Dang & Associates-Chartered Accountants

Pune

CA Inter

View Details
Company
12 June 2026
Accounts & Taxation Executive

Winshine Financial Services

Mumbai

CA Inter

View Details
Company
Featured 27 May 2026
Lead Conversion Executive / Sales Closing Executive

SMJ global advisors pvt ltd

New Delhi

B.Com

View Details
Company
Featured 27 May 2026
Lead Conversion Executive / Sales Closing Executive

SMJ global advisors pvt ltd

New Delhi

B.Com

View Details
Company
ARTICLESHIP 20 June 2026
Articleship

RB KESHRI & CO

Mumbai

B.Com

View Details
Company
27 May 2026
Audit Assitant

Virender K Gupta and Co

New Delhi

B.Com

View Details
Company
ARTICLESHIP 28 May 2026
Accounts, Audit & Compliance Executive

Shyam Joshi & Associates

Pune

B.Com

View Details
Company
04 June 2026
Semi Qualified CA

Goyal Puneet & Associates

New Delhi

CA Final

View Details