Question: . Length Converter 0 1 . 0 2 . 4 0 Problem Statement You are given two integers unit and km . Your task is
Length Converter
Problem Statement
You are given two integers unit and km Your task is to convert input kilometre km value as follows:
If unit then convert kilometre to metre where km m
If unit then convert kilometre to centimetre where Ikm cm
If unit then convert kilometre to millimetre where km mm
Print the converted value.
Input Format:
The input consists of a single line:
The line contains two integers unit and km
The input will be read from the STDIN by the candidate
Output Format:
Print the converted value.
The output will be matched to the candidate's output printed on the STDOUT
Constraints:
unit
km
Example:
Input:
Output:
Explanation:
Since unit kilometre is converted to metre, metre Thus, output is
Sample input
Sample Outp
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
