C Program to Convert Centimeter to Meter and Kilometer

In this tutorial you will learn about the C Program to Convert Centimeter to Meter and Kilometer and its application with practical example.

C Program to convert Centimeter to Meter and Kilometer

In this tutorial, we will learn to create a C program that will convert Centimeter to Meter and Kilometer in C programming.

Table Of Contents

Prerequisites

Before starting with this tutorial, we assume that you are the best aware of the following C programming topics:

  • Operators in C Programming.
  • Basic Input and Output function in C Programming.
  • Basic C Programming.
  • Arithmetic Operators in C Programming.

What are Centimeter, Meter and Kilometer?

The Centimeter, Meter, and Kilometer are the metric units for the measurement of length between two points.

Description Table below.

Algorithm:-

Program to Convert Centimeters to meters and Kilometer.

In today’s program, we will first take the input from the user in centimeters. And then we will convert that input into meters, kilometers using a small program. Using the above table conversion values.

With the help of the below program, we can convert the centimeters to bigger units.

Program Code:-

Output:-

In the above program, we have first initialized the required variable.

  • cm = it will store the input centimeters value.

Taking the input from the user in centimeters.

Converting into bigger values.

Printing the output of the program.

In this tutorial we have learn about the C Program to Convert Centimeter to Meter and Kilometer and its application with practical example. I hope you will like this tutorial.