#K45552. Date Format Converter
Date Format Converter
Date Format Converter
You are given a date string in the format YYYY-MM-DD
. Your task is to convert this date into the format DD/MM/YYYY
. For example, if the input is "2023-07-19", the output should be "19/07/2023".
Please note that the input may contain years with leading zeros (e.g. "0012-04-04") and the output must preserve these formats. The conversion formula can be expressed as follows:
$$ \text{output} = \text{day} + "/" + \text{month} + "/" + \text{year} $$
Ensure that your solution reads from standard input (stdin) and writes to standard output (stdout).
inputFormat
The input consists of a single line containing a date string formatted as YYYY-MM-DD
.
outputFormat
Output the corresponding date in DD/MM/YYYY
format. Make sure to print exactly one line with the result.
2023-07-19
19/07/2023