Area of Trapezium : C Program

Computer Science » C Program » Area of Trapezium 

Definition :

&

Image :

Formula :

area (A) = (a+b/2) * h

Where,
A is the area of the Trapezium
a is the one side base of the Trapezium
b is the another side base of the Trapezium
h is the height of the Trapezium

Program :

#include<stdio.h>
int main()
{
	float base1,base2,height,area;

	printf("nEnter base1 of Trapezium : ");
	scanf("%f",&base1);

	printf("nEnter base2 of Trapezium : ");
	scanf("%f",&base2);

	printf("nEnter height of the Trapezium : ");
	scanf("%f",&height);

	area=((base1+base2)/2 )*height;
	printf("nArea of Trapezium : %fn",area);

	return 0;
}

Output :

enter base1 of Trapezium : 10.00
enter base2 of Trapezium : 15.00
enter height of the Trapezium : 20.00
Area of Trapezium: 250.00
Subject Name : Computer Science
Exam Name : IIT GATE, UPSC ESE, RRB, SSC, DMRC, NMRC, BSNL, DRDO, ISRO, BARC, NIELIT
Posts Name : Assistant Engineer, Management Trainee, Junior Engineer, Technical Assistant
Computer Science Books

GATE 2023 Total InfoENGG DIPLOMAUGC NET Total Info
IES 2023 Total InfoPSUs 2022 Total InfoCSIR UGC NET Total Info
JAM 2023 Total InfoM TECH 2023 Total InfoRAILWAY 2022 Total Info

Related Posts

  • Area of Parallelogram : C ProgramComputer Science » C Program » Area of Parallelogram  Definition : & Image : Formula : [php]area (A) = b * h[/php] Where, A is the area of the Parallelogram b is the base of the Parallelogram h is the height of the Parallelogram Program : [php] #include<stdio.h> int main() { float base,height,area; printf("nEnter the base of Parallelogram : "); scanf("%f", &base); printf("nEnter the height of Parallelogram : "); scanf("%f", &height); area = base * height; printf("nArea of Parallelogram : %f", area); return (0); }[/php] Output : [php]Enter the base of Parallelogram : 2.0 Enter the height of Parallelogram : 4.0 Area of Parallelogram : 8.0[/php]
    Tags: area, program, computer, science, definition, image, formula, base, height, output
  • Area of Rectangle : C ProgramComputer Science » C Program » Area of Rectangle Definition : 1. A plane figure with 4 sides and 4 right angles and having equal opposite sides. 2. Adjucent sides makes an angle of 90 degree. 3. You can compute the area of a Rectangle if you know its length and breadth. Image : Formula : [php]area (A) = w * h[/php] Where, A is the area of the rectangle w is the width of the rectangle h is the height of the rectangle Program : [php] #include<stdio.h> int main() { int width, height, area; printf("nEnter the Width of Rectangle : "); scanf("%d", &width); printf("nEnter the Height of Rectangle : "); scanf("%d", &height); area = width * height; printf("nArea of Rectangle : %d", area); return (0); }[/php] Output : [php] Enter the Width of Rectangle : 4 Enter the Height of Rectangle : 2 Area of Rectangle : 8[/php]
    Tags: area, program, output, height, formula, image, definition, science, computer, programs
  • Area of Circle : C ProgramComputer Science » C Program » Area of Circle  Definition : 1. Ellipse in which the two axes are of equal length. 2. Plane curve generated by one point moving at a constant distance from a fixed point. 3. You can compute the area of a Circle if you know its radius. Image : Formula : [php]area (A) = πr²[/php] Where, A is the area of the Circle r is the radius of the Circle Program : [php]#include<stdio.h> int main() { int radius; float area; printf("nEnter the radius of Circle : "); scanf("%d", &radius); area = 3.14 * radius * radius; printf("nArea of Circle : %f", area); return (0); }[/php] Output : [php]Enter the radius of Circle : 2.0 Area of Circle : 12.56[/php]
    Tags: area, program, output, formula, image, definition, science, computer, programs
  • Area of Rhombus : C ProgramComputer Science » C Program » Area of Rhombus  Definition : & Image : Formula : [php]area (A) = (p * q) / 2[/php] Where, A is the area of the Rhombus p is the Diagonal of the Rhombus q is the another Diagonal of the Rhombus Program : [php]#include<stdio.h> int main() { float diagonal1,diagonal2,area; printf("nEnter diagonal1 of Rhombus : "); scanf("%f",&diagonal1); printf("nEnter diagonal2 of Rhombus : "); scanf("%f",&diagonal2); area=(diagonal1 * diagonal2) / 2; printf("nArea of Rhombus : %f",area); return 0; }[/php] Output : [php]Enter diagonal1 of Rhombus : 10.00 Enter diagonal2 of Rhombus : 20.00 Area of Rhombus: 100.00[/php]
    Tags: area, program, computer, science, definition, image, formula, output, programs
  • Area of Right angle Triangle : C ProgramComputer Science » C Program » Area of Right angle Triangle Definition : 1. Triangle having one angle of measure 90 degree is called Right angle Triangle. 2. Sides of Triangle are : base , height , hypotenuse. 3. You can compute the area of a Triangle if you know its any two sides. Image : Formula : [php]area (A) = (b * h) / 2[/php] Where, A is the area of the Triangle b is the base of the Triangle h is the height of the Triangle Program : [php]#include<stdio.h> int main() { int base, height; float area; printf("nEnter the base of Right Angle Triangle : "); scanf("%d", &base); printf("nEnter the height of Right Angle Triangle : "); scanf("%d", &height); area = 0.5 * base * height; printf("nArea of Right Angle Triangle : %f", area); return (0); }[/php] Output : [php]Enter the base of Right Angle Triangle : 4 Enter the height of Right Angle Triangle : 8 Area of Right Angle Triangle : 16.0[/php]
    Tags: area, program, height, base, programs, computer, science

LEAVE A REPLY

Please enter your comment!
Please enter your name here