Create a program-positive floating point numbers


Discuss the below:

Q: Create a program that asks the user to enter two positive floating point numbers and after checking their validity it prints them in fixed point notation with the width of ten and with two digits to the right of the decimal point. It uses the conditional operator to determine which number is smaller and which number is larger. It adds the larger number to variable total1 and the smaller number to the variable total2. The program should repeat ten times this process of reading the two number comparing them and assigning them to either total1 or total2. Use For loop to implement the repetition. Write the values of total1 and total2 after the loop in an output file.

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Create a program-positive floating point numbers
Reference No:- TGS01937373

Now Priced at $20 (50% Discount)

Recommended (91%)

Rated (4.3/5)