|
|||
Temperature FluctuationWrite a program that reads lines in the following format until end-of-file from the text file given as the first command line argument: settlement_name: temperature,temperature[,temperature]... settlement_name is a string of up to 30 characters, the temperature data are signed integers, and the total length of the line does not exceed 1000 characters. Each line contains the temperature data for a given settlement in a certain time interval. We do not know the exact number of measurements, but we know that at least two but no more than five hundred measurements are made during the time interval. For each settlement, the program should write to the standard output the temperature fluctuation during the time interval, i.e., the difference between the largest and the smallest measured temperature. The format of each line in the output should be as follows: settlement_name: temperature_fluctuation Sample Input
Output for Sample Input
Acknowledgement
This work was supported by the construction EFOP-3.4.3-16-2016-00021. The project was supported by the European Union, co-financed by the European Social Fund.
|
|||
University of Debrecen; Faculty of Informatics; v. 09/30/2024 |