1.

How to write a programme to convert kilometers to meters when the distance in kilometers is input by the user.The program should display the distance in meters. (The arithmetic formula is :- 1 km= 1000 m).

Answer»

Explanation(km=m/1000, 1000 meter is equal to 1 KILOMETER) print kilometer km. (USING PRINTF statement) (since kilometer may be in fractional values like 1.2 and 5.2, it is DECLARED & print as float.)



Discussion

No Comment Found