C program to find angles of triangle if two angles are given

Write a C Program to input two angles from user and find third angle of the triangle. How to find all angles of a triangle if two angles are given by user using C programming. C program to calculate the third angle of a triangle if two angles are given.

ExampleInput

Enter first angle: 60
Enter second angle: 80

Output

Third angle = 40

Read more

C program to convert temperature from degree celsius to fahrenheit

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

Example
Input

Enter temperature in Celsius = 100

Output

Temperature in Fahrenheit = 212 F

Read more

C program to convert centimeter to meter and kilometer

Write a C program to input length in centimeter and convert it to meter and kilometer. How to convert length from centimeter to meter and kilometer in C programming. Length conversion program in C from centimeter to meter and centimeter to kilometer.

Example
Input

Enter length in centimeter = 1000

Output

Length in meter = 10 m
Length in kilometer = 0.01 km

Read more

C program to find diameter, circumference and area of circle

Write a C program to input radius of a circle from user and find diameter, circumference and area of the circle. How to calculate diameter, circumference and area of a circle whose radius is given by user in C programming. Logic to find diameter, circumference and area of a circle in C.

Example
Input

Enter radius: 10

Output

Diameter = 20 units
Circumference = 62.79 units
Area = 314 sq. units

Read more

C program to find area of a rectangle

Write a C program to input length and width of a rectangle and find area of the given rectangle. How to calculate area of a rectangle in C programming. Logic to find area of a rectangle whose length and width are given in C programming.

Example
Input

Enter length: 5
Enter width: 10

Output

Area of rectangle = 50 sq. units

Read more

C program to find perimeter of a rectangle

Write a C program to input length and width of a rectangle and calculate perimeter of the rectangle. How to find perimeter of a rectangle in C programming. Logic to find the perimeter of a rectangle if length and width are given in C programming.

Example
Input

Enter length: 5
Enter width: 10

Output

Perimeter of rectangle = 30 units

Read more

C program to perform all arithmetic operations

Write a C program to input two numbers and perform all arithmetic operations. How to perform all arithmetic operation between two numbers in C programming. C program to find sum, difference, product, quotient and modulus of two given numbers.

Example
Input

First number: 10
Second number: 5

Output

Sum = 15
Difference = 5
Product = 50
Quotient = 2
Modulus = 0

Read more

C program to add two numbers

Write a C program to input two numbers from user and calculate their sum. C program to add two numbers and display their sum as output. How to add two numbers in C programming.

Example
Input

Input first number: 20
Input second number: 10

Output

Sum = 30

Read more

What are Escape sequence characters?

Escape characters are sequence of characters that are converted to some another character which are difficult or impossible to print directly. Characters such as new lines, you cannot print a new line directly in any programming language by hitting enter key. To print new line an special character is given \n which is later converted … Read more