Previous
0 / 5
Module DEMO-32-54DEMO-C-32

Convert Kilograms to Pounds

DEMO-C-32 • Programming in C

Browser-only practice

Problem Statement

Sara lived in Jordan for a long time, and she knows how to deal with weight units in kilogram (kg). Sara travelled recently to Canada, and she should now start learning how to calculate the values of kg in the pound (lb).

Write a program that reads a real value that represents the weight in (kg) and then calculates the equivalent value in (lb).

Hint: The approximate relation is 1 kg = 2.2 lb​

Constraints

0 < x < 1000000

Input Format

​A single real value x represents the weight in kg

Output Format

One line as follows: x kg = y lb (approximately)

where y is the result of converting x into lb. Both x and y in the output should be displayed with two decimal places.

Sample Testcases

Submit runs every public testcase in this browser. Results and code never leave this device.

Sample #1
Public sample
5
5.00 kg = 11.00 lb (approximately)
Sample #2
Public sample
7.5
7.50 kg = 16.50 lb (approximately)

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
Editor settings