# Tag Archives: C

## C program to add two numbers and display sum in the screen

CODES: View the code on Gist. OUTPUTS: enter values of a and b: 2 3 the sum is 5.00

## C program to read a character from user and display it ASCII value

CODES: View the code on Gist. CODES: enter a character: B the ASCII value of character B is 66

## C program to read three sides of a triangle and calculate the area

CODES: View the code on Gist. OUTPUTS: enter three sides of triangle a,b,c:3 4 5 the area of the triangle is :6.00

## C program to read height and base of a triangle and find the area of it

CODES: View the code on Gist. OUTPUTS: enter the height of triangle:5 enter the base of triangle :3.5 the area of the triangle is:8.75

## C program to calculate the area and perimeter of rectangle

CODES: View the code on Gist. OUTPUTS: enter the length and breadth of a rectangle :2.5 1.5 the area of rectangle is :3.750000 the perimeter of rectangle is :8.000000

## C program that asks name of student and marks obtained by him/her in seven subjects and display the percentage of students assuming full marks 100 for each subject

CODES: View the code on Gist. OUTPUTS: enter the name of student:gauri enter the marks in different seven subjects:90 23 56 89 65 44 65 the percentage of shyam is:61.71

## C program that will convert temperature in fahrenheit into centigrade

CODES: View the code on Gist. OUTPUTS: enter the temperature in fahrenheit:101 the equivalent temperature in centigrade :38.33

## C program that will convert temperature in centigrade into fahrenheit

CODES: View the code on Gist. OUTPUTS: enter the temperature in centigrade: 41 the equivalent temperature in fahrenheit is :105.80

## C program to calculate area between two concentric circles having radius r1 and r2 cm by using symbolic constant for values of PI.

CODES: View the code on Gist. OUTPUTS: enter the radius of large circle:5 enter the radius of small circle:3 the area of the first circle is:78.57 the area of second circle is:28.29 the area between two circle is :50.28

## C program to calculate circumference of a circle having radius r which should be taken from the user.

CODES: View the code on Gist. OUTPUTS: Enter the radius of circle:12 the circumference of circle is :75.43