Read a double number as 2 digits after the decimal point


In C language:

Read a double number as 2 digits after the decimal point. The number should have at least 6 digits BEFORE the decimal point.

Extract all digits at even positions. Print them in reverse order.

Extract all digits at odd positions. Print in order of occurrence.

Number in file: 222333444.595666

Program reads: 222333444.59

Even positioned digits printed in reverse order: 5 4 3 3 2

Odd positioned digits printed in order - 2 2 3 4 4 9

Sample codes,: https://justpaste.it/4f8m9

  1. extract wrong
  2. didn't extract the number after decimal

Solution Preview :

Prepared by a verified Expert
Business Management: Read a double number as 2 digits after the decimal point
Reference No:- TGS02921923

Now Priced at $10 (50% Discount)

Recommended (91%)

Rated (4.3/5)