Write a c++ program to calculate the area of triangle | Ameer Yousuf - C++ Programs Codes

Latest

Sunday, 31 January 2021

Write a c++ program to calculate the area of triangle | Ameer Yousuf

 CODE:

#include<iostream>
using namespace std;
int main(){
int base,vertical_height,area;
cout<<"Enter the length of Base : ";
cin>>base;
cout<<"Enter the length of height: ";
cin>>vertical_height;
area=(base*vertical_height)/2;
cout<<"The Area is : "<<area<<endl;
return 0;
}

OUTPUT:



No comments:

Post a Comment

Plz don't enter any spam link in the comment box!