#C12618. Celsius to Fahrenheit Conversion
Celsius to Fahrenheit Conversion
Celsius to Fahrenheit Conversion
You are given a list of temperatures in Celsius. Your task is to convert each temperature into its Fahrenheit equivalent using the formula:
$$F = \frac{9}{5} \times C + 32$$
The program should read input from stdin
and produce output to stdout
. Each Fahrenheit temperature must be formatted as a floating point number with one decimal place. If the input list is empty, no output should be produced.
inputFormat
The first line contains a single integer N
representing the number of temperatures. The second line contains N
space-separated numbers, each representing a temperature in Celsius.
outputFormat
Output a single line with N
space-separated numbers, each corresponding to the converted temperature in Fahrenheit (formatted to one decimal place). If N
is 0, output nothing.## sample
4
0 -40 100 37
32.0 -40.0 212.0 98.6