Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
306 B
3
Indexable
Never
#include <iostream>
using namespace std;

void area(){
  double ar, b, h;
  cout <<"Enter base of a triangle: ";
  cin>>b;
  cout<<"\n";

  cout<<"enter height of a triangle :";
  cin>>h;
    cout<<"\n";
  ar = 1/2*b*h;
  cout<<"AREA OF A TRIANGLE:"<<ar<<endl;

 
}
int main() {

  area();
  
  return 0;
}