Category Archives: Basic Formula Calculation C Programs

C Program Matrix Multiplication

C Program Matrix Multiplication /* C program to multiplication two matrices Matrix Multiplication www.easyCodeBook.com */ #include <stdio.h> int main() { int m, n, p, q, i, j, k; int matrix1[10][10], matrix2[10][10], multiplication[10][10]; printf("Enter number of rows and columns of matrix1\n"); scanf("%d%d", &m, &n); printf("Enter number of rows and columns of matrix2\n"); scanf("%d%d", &p, &q); if… Read More »

 625 total views,  4 views today

C Program To Calculate Circumference of Circle

Q: Write a C Program To Calculate Circumference of Circle. Input radius of the circle from the user at run time. Use the formula: circumference of circle = 2 * PI * radius The Logic Behind C Program to Find Circumference of Circle This is a simple C program using formula calculation technique. The basic… Read More »

 1,165 total views,  8 views today

C Code To Swap Values of Two Variables

This is a simple C Code To Swap Values of Two Variables using a third temporary variable. This C code uses simple assignment statements to swap the values. We will use a third variable called temp to exchange values of two variables. First we save the value of first variable in temp variable. Now we… Read More »

 1,055 total views,  1 views today

Fahrenheit to Celsius Conversion C Program

This is a C language program for Fahrenheit to Celsius Conversion. It converts Fahrenheit to Celsius using formula:Celsius = (Fahrenheit – 32) * 5.0 /9.0 /*Write a C program to Convert Fahrenheit into Celsius*/#include <stdio.h> int main() { float fahren, celsius; printf(“Enter temperature in Fahrenheit=”); scanf(“%f”, &fahren); celsius = (fahren-32)*5.0 / 9.0; printf(“%.2f Fahrenheit is… Read More »

 1,914 total views,  17 views today

Convert Person Height from Inches to Centimeters

Today we will write a C language program to convert person height from inches to centimeters. This is a simple formula calculation program. The following is the formula: centimeters = inches x 2.54. /* C Program to convert person’s height from inches to centimeters using formula 2.54 * height */ #include<stdio.h> int main() { float… Read More »

 1,207 total views,  6 views today

Degree Celsius to f conversion program

“Degree Celsius to f conversion” program will compute Fahrenheit temperature. This program takes temperature in Celsius degrees. The popular formula for Degree Celsius to f conversion is: f = 9/5 x c + 32   /* Write a C Program to input temperature in Celcius and converts it into Fahrenheit formula is f = 9/5… Read More »

 1,704 total views,  4 views today

C Program Compute Distance Covered By Car

This is a basic C Programming language program. It is a formula calculation example program in C language. This program uses the following statements: First line starts with Pre processor directives Pre processor directives will include required header file/s. It uses scanf() function for input. We use printf() function for output This program uses assignment… Read More »

 4,182 total views,  27 views today