Category Archives: Basic Formula Calculation C Programs

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 »

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 »

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 »

Compute area of Triangle Input Three Sides

/* C Program how to calculate surface area of a triangle when three sides are given */ #include<stdio.h> #include<math.h> int main() { float side1, side2, side3, s, area; printf(“Enter the length of first side of triangle =”); scanf(“%f”, &side1); printf(“Enter the length of second side of triangle =”); scanf(“%f”, &side2); printf(“Enter the length of third… Read More »