WorldTemperature.com is a website which list various temperature of cities all over the world. In their website, some cities use different metric temperature; Celsius (C) and Fahrenheit (F). In the next month, they want to add a feature to sort the list of cities based on their temperature; from the coldest to the hottest cities. Nevertheless, they still want to keep the original temperature metric for all cities. Format Input All temperature data are stored in a file named testdata.in with maximum N lines. Each line contains three data, those are: City Name, Temperature, and Metric. Each data is separated by # as a delimiter. Format Output N lines temperature data which list the coldest to the hottest cities. If two or more cities have the same amount of temperature, sort them by using city name in ascending order (A-Z). The format of the output is “[city name] is [temperature][metric]”. Use a two-digit comma separated number format for the temperature. Constraints • 1 ≤ N ≤ 100 • 1 ≤ Length of City Name ≤ 1000 • −60 ≤ temperature ≤ 224 Sample Input (testdata.in) Jakarta#28#C New York#37.4#F Tokyo#9#C London#9#C Singapore#27#C Vancouver#-1#C Taipei#64.4#F Denver#-4#C Santiago#69.8#F New Delhi#11#C Sample Output Denver is -4.00C Vancouver is -1.00C New York is 37.40F London is 9.00C Tokyo is 9.00C New Delhi is 11.00C Taipei is 64.40F Santiago is 69.80F Singapore is 27.00C Jakarta is 28.00C Note: Celcius = (Fahrenheit − 32) ∗ 5/9 Please Use Standard C Language and Simple Code  Do not use header include stdlib.h

COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
1st Edition
ISBN:9780357392676
Author:FREUND, Steven
Publisher:FREUND, Steven
Chapter8: Working With Trendlines, Pivottables, Pivotcharts, And Slicers
Section: Chapter Questions
Problem 8EYW
icon
Related questions
icon
Concept explainers
Question

WorldTemperature.com is a website which list various temperature of cities all over the world. In their website, some cities use different metric temperature; Celsius (C) and Fahrenheit (F). In the next month, they want to add a feature to sort the list of cities based on their temperature; from the coldest to the hottest cities. Nevertheless, they still want to keep the original temperature metric for all cities.

Format Input
All temperature data are stored in a file named testdata.in with maximum N lines. Each line contains three data, those are: City Name, Temperature, and Metric. Each data is separated by # as a delimiter.

Format Output
N lines temperature data which list the coldest to the hottest cities. If two or more cities have the same amount of temperature, sort them by using city name in ascending order (A-Z). The format of the output is “[city name] is [temperature][metric]”. Use a two-digit comma separated number format for the temperature.

Constraints
• 1 ≤ N ≤ 100
• 1 ≤ Length of City Name ≤ 1000
• −60 ≤ temperature ≤ 224

Sample Input (testdata.in)

Jakarta#28#C
New York#37.4#F
Tokyo#9#C
London#9#C
Singapore#27#C
Vancouver#-1#C
Taipei#64.4#F
Denver#-4#C
Santiago#69.8#F
New Delhi#11#C

Sample Output

Denver is -4.00C
Vancouver is -1.00C
New York is 37.40F
London is 9.00C
Tokyo is 9.00C
New Delhi is 11.00C
Taipei is 64.40F
Santiago is 69.80F
Singapore is 27.00C
Jakarta is 28.00C


NoteCelcius = (Fahrenheit − 32) ∗ 5/9
Please Use Standard C Language and Simple Code 

Do not use header include stdlib.h 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Query Syntax
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning