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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education