
Call 1800-123-2003
"Smartindia is the best online tool for school students." Ms Deepa Chandran, Principal Anchal
"Smartindia is one of the best supplementary education tool for school students." Ms Pooja, Principal
HOW TO WRITE A TURBOC++ APPLICATION TO FIND THE AREA OF A TRAPEZIUM? |
#include<iostream.h> #include<conio.h> void main() { float base1; float base2; float height; float area; cout<<"Enter the value for first base of a trapezium"; cin>>base1; cout<<"Enter the value for second base of a trapezium"; cin>>base2; cout<<"Enter the value for height of a trapezium"; cin>>height; area=0.5*(base1+base2)*height; cout<<"Area of a trapezium is:"; cout<<area; getch(); } |