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

CODES:

OUTPUTS:

enter values of a and b:

2

3

the sum is 5.00

Posted in C, Fundamentals of C | Tagged , , , , , | Leave a comment

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

CODES:

CODES:

enter a character: B

the ASCII value of character B is 66

Posted in C, Fundamentals of C | Tagged , , , , , | Leave a comment

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

CODES:

OUTPUTS:

enter three sides of triangle a,b,c:3 4 5

the area of the triangle is :6.00

Posted in C, Fundamentals of C | Tagged , , , , , | Leave a comment

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

CODES:

OUTPUTS:

enter the height of triangle:5

enter the base of triangle :3.5

the area of the triangle is:8.75

Posted in C, Fundamentals of C | Tagged , , , , , | Leave a comment

C program to calculate the area and perimeter of rectangle

CODES:

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

Posted in C, Fundamentals of C | Tagged , , , , , | Leave a comment

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:

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

 

Posted in C, Fundamentals of C | Tagged , , , , , | Leave a comment

C program that will convert temperature in fahrenheit into centigrade

CODES:

OUTPUTS:

enter the temperature in fahrenheit:101

the equivalent temperature in centigrade  :38.33

Posted in C, Fundamentals of C | Tagged , , , , , | Leave a comment

C program that will convert temperature in centigrade into fahrenheit

CODES:

OUTPUTS:

enter the temperature in centigrade: 41

the equivalent temperature in fahrenheit is :105.80

Posted in C, Fundamentals of C | Tagged , , , , , | Leave a comment

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

CODES:

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

Posted in C, Fundamentals of C | Tagged , , , , , | Leave a comment

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

CODES:

OUTPUTS:

Enter the radius of circle:12

the circumference of circle is :75.43

Posted in C, Fundamentals of C | Tagged , , , , | Leave a comment