Get Instant Help From 5000+ Experts For
question

Writing: Get your essay and assignment written from scratch by PhD expert

Rewriting: Paraphrase or rewrite your friend's essay with similar meaning at reduced cost

Editing:Proofread your work by experts and improve grade at Lowest cost

And Improve Your Grades
myassignmenthelp.com
loader
Phone no. Missing!

Enter phone no. to receive critical updates and urgent messages !

Attach file

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Guaranteed Higher Grade!
Free Quote
wave
Basic and Enhanced Part of Total Value Calculation Program

Part 1 - Basic part

• You may assume that all input numbers are valid.

• Print in ascending order of the "total value".

• The "total value" is right aligned to the field width of the largest number.

• No simplification of fraction is needed.

• Default PASS runtime limit (5 sec) is adopted for each test case.

• It is guaranteed that the user input are numbers, however it may not be an integer in range [1..12]. Upon invalid input, the program should print the error message and keep reading until a valid number is entered. (Apart from that, no other error checking is needed)

• The output should be sorted in descending order of probability. If there are several "total values" having the same probability, print in ascending order of "total".

• The fraction should be in the simplest form (e.g. 1/2 instead of 6/12).

• Runtime limit is 1 second for each test case.

support
close