Answers for "c trapezoid area"

1

c trapezoid area

#include <stdlib.h>
#include <stdio.h>
#include <math.h>

int main() {
	double a, b, c, d;
	
	printf("TRAPEZOID AREA\n\n\nMajor base: ");
	scanf("%lf", &a);
	
	printf("\nMinor base: ");
	scanf("%lf", &b);
	
	printf("\nHeight: ");
	scanf("%lf", &c);
	
	d = (a + b)*c/2.0;
	
	printf("\n\nThe area is: %lf\n\n\n", d);
	
	
	system("pause");
}
Posted by: Guest on February-11-2021

Browse Popular Code Answers by Language