C program to convert centimeter to Inches

C Programming Language Overview of C Language (Article) Overview of C Language (Program)

1491

Program:

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

Output:

Inches is: 3.94

Explanation:

Formula: double inch = 0.3937 * centi;

This Particular section is dedicated to Programs only. If you want learn more about C Programming Language. Then you can visit below links to get more depth on this subject.