C program to perform input output of all basic data types

Write a C program to demonstrate input and output of all basic and derived types. How to use `scanf()` and `printf()` function perform input and output on primitive types in C programming.

C program to convert days to years weeks and days

Write a C program to input number of days from user and convert it to years, weeks and days. How to convert days to years, weeks in C programming. Logic to convert days to years, weeks and days in C program.

Example
Input

`Enter days: 373`

Output

`373 days = 1 year/s, 1 week/s and 1 day/s`

C program to convert temperature from degree fahrenheit to celsius

Write a C program to input temperature in degree Fahrenheit and convert it to degree Centigrade. How to convert temperature from Fahrenheit to Celsius in C programming. C program for temperature conversion. Logic to convert temperature from Fahrenheit to Celsius in C program.

Example
Input

`Temperature in fahrenheit = 205`

Output

`Temperature in celsius = 96.11 C`

C program to calculate Compound Interest

Write a C program to input principle (amount), time and rate (P, T, R) and find Compound Interest. How to calculate compound interest in C programming. Logic to calculate compound interest in C program.

Example
Input

```Enter principle (amount): 1200
Enter time: 2
Enter rate: 5.4```

Output

`Compound Interest = 133.099197`

C program to calculate Simple Interest

Write a C program to input principle, time and rate (P, T, R) from user and find Simple Interest. How to calculate simple interest in C programming. Logic to find simple interest in C program.

Example
Input

```Enter principle: 1200
Enter time: 2
Enter rate: 5.4```

Output

`Simple Interest = 129.600006`

C program to calculate total average and percentage of five subjects

Write a C program to input marks of five subjects of a student and calculate total, average and percentage of all subjects. How to calculate total, average and percentage in C programming. Logic to find total, average and percentage in C program.

Example
Input

`Enter marks of five subjects: 95 76 85 90 89`

Output

```Total = 435
Average = 87
Percentage = 87.00```

C program to find square root of a number

Write a C program to input a number and find square root of the given number. How to find square root of a number in C programming using inbuilt `sqrt()` function. How to use predefined `sqrt()` function to find square root in C program.

Example
Input

`Enter any number: 9`

Output

`Square root of 9 = 3`

C program to find area of an equilateral triangle

Write a C program to input side of an equilateral triangle from user and find area of the given triangle. How to find area of an equilateral triangle in C programming. C program to calculate area of an equilateral triangle if its side is given.

Example

Input

`Enter side of the equilateral triangle: 10`

Output

`Area of equilateral triangle = 43.3 sq. units`

C program to find area of a triangle

Write a C program to input base and height of a triangle and find area of the given triangle. How to find area of a triangle in C programming. Logic to find area of a triangle in C program.

Example
Input

```Enter base of the triangle: 10
Enter height of the triangle: 15```

Output

`Area of the triangle = 75 sq. units`

C program to find power of a number using pow function

Write a C program to input two numbers from user and find their power using `pow()` function. How to find power of a number in C programming. How to use `pow()` function in C programming.

Example
Input

```Enter base: 5
Enter exponent: 2```

Output

`5 ^ 2 = 25`