# Program to convert Centimeter to Feet and Inches

In this article, we will learn how to convert Height, given in centimeter to Height in feet and inches.

Examples:

Input : centimeter = 10 Output : inches = 3.94 feet = 0.33 Input : centimeter = 85 Output : inches = 33.46 feet = 2.79

We know that 1 inch is equal to 2.54 centimeter, so 1 centimeter is equal to 0.3937 inches. Therefore, **n centimeters are equal to (n * 0.3937)inches**.

We also know that 1 foot is equal to 30.48 centimeter, therefore, 1 centimeter is equal to 0.0328 feet. So, **n centimeters are equal to (n * 0.0328)feet**.

## C/C++

`// C program to convert centimeter to feet and Inches ` `#include <stdio.h> ` ` ` `// Function to perform conversion ` `double` `Conversion(` `int` `centi) { ` ` ` `double` `inch = 0.3937 * centi; ` ` ` `double` `feet = 0.0328 * centi; ` ` ` `printf` `(` `"Inches is: %.2f \n"` `, inch); ` ` ` `printf` `(` `"Feet is: %.2f"` `, feet); ` ` ` `return` `0; ` `} ` ` ` `// Driver Code ` `int` `main() { ` ` ` `int` `centi = 10; ` ` ` `Conversion(centi); ` ` ` `return` `0; ` `} ` |

*chevron_right*

*filter_none*

## Java

`// Java program to convert ` `// centimeter to feet and Inches ` `import` `java.io.*; ` ` ` `class` `GFG { ` ` ` ` ` `// Function to perform conversion ` ` ` `static` `double` `Conversion(` `int` `centi) ` ` ` `{ ` ` ` `double` `inch = ` `0.3937` `* centi; ` ` ` `double` `feet = ` `0.0328` `* centi; ` ` ` `System.out.printf(` `"Inches is: %.2f \n"` `, inch); ` ` ` `System.out.printf(` `"Feet is: %.2f"` `, feet); ` ` ` `return` `0` `; ` ` ` `} ` ` ` ` ` `// Driver Code ` ` ` `public` `static` `void` `main(String args[]) ` ` ` `{ ` ` ` `int` `centi = ` `10` `; ` ` ` `Conversion(centi); ` ` ` `} ` `} ` ` ` `/*This code is contributed by Nikita Tiwari.*/` |

*chevron_right*

*filter_none*

## Python3

`# Python program to convert centimeter to feet and ` `# Inches Function to perform conversion ` `def` `Conversion(centi): ` ` ` `inch ` `=` `0.3937` `*` `centi ` ` ` `feet ` `=` `0.0328` `*` `centi ` ` ` `print` `(` `"Inches is:"` `, ` `round` `(inch, ` `2` `)) ` ` ` `print` `(` `"Feet is:"` `, ` `round` `(feet, ` `2` `)) ` ` ` `# Driver Code ` `centi ` `=` `10` `Conversion(centi) ` |

*chevron_right*

*filter_none*

## C#

`// C# program to convert ` `// centimeter to feet and Inches ` `using` `System; ` ` ` `class` `GFG { ` ` ` ` ` `// Function to perform conversion ` ` ` `static` `double` `Conversion(` `int` `centi) ` ` ` `{ ` ` ` `double` `inch = 0.3937 * centi; ` ` ` `double` `feet = 0.0328 * centi; ` ` ` `Console.WriteLine(` `"Inches is: "` `+ inch); ` ` ` `Console.WriteLine(` `"Feet is: "` `+ feet); ` ` ` `return` `0; ` ` ` `} ` ` ` ` ` `// Driver Code ` ` ` `public` `static` `void` `Main() ` ` ` `{ ` ` ` `int` `centi = 10; ` ` ` `Conversion(centi); ` ` ` `} ` `} ` ` ` `// This code is contributed by vt_m. ` |

*chevron_right*

*filter_none*

## PHP

`<?php ` `// PHP program to convert ` `// centimeter to feet and Inches ` ` ` `// Function to perform conversion ` `function` `Conversion(` `$centi` `) ` `{ ` ` ` `$inch` `= 0.3937 * ` `$centi` `; ` ` ` `$feet` `= 0.0328 * ` `$centi` `; ` ` ` `echo` `(` `"Inches is: "` `. ` `$inch` `. ` `"\n"` `); ` ` ` `echo` `(` `"Feet is: "` `. ` `$feet` `); ` `} ` ` ` `// Driver Code ` `$centi` `= 10; ` `Conversion(` `$centi` `); ` ` ` `// This code is contributed by Ajit. ` `?> ` |

*chevron_right*

*filter_none*

Output:

Inches is: 3.94 Feet is: 0.33

## Recommended Posts:

- Program to check if a date is valid or not
- Program to print the diamond shape
- Program to print Happy Birthday
- C++ program to convert time from 12 hour to 24 hour format
- Java program to check palindrome (using library methods)
- Program to print a pattern of numbers
- Python Program to print digit pattern
- Program to find sum of elements in a given array
- C Program to Swap two Numbers
- Program to check if a given year is leap year
- Program to find largest element in an array
- Program to multiply two matrices
- Program for Tower of Hanoi
- Program to cyclically rotate an array by one
- Program to find GCD or HCF of two numbers

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.