Sunday, April 29, 2018

Area of the Triangle in C++

Simple program to solve the area of the triangle written in C++.

I am currently accepting programming work, it project, school programming projects , thesis and capstone projects, IT consulting work and web development work kindly contact me in the following email address for further details.  If you want to advertise in my website kindly contact me also in my email address also. Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.



Program Listing

triangle.cpp

#include <iostream>
#include <cstdlib>

using namespace std;

int main()
{
    double b,h;

    cout<<"[ Area of a triangle ]"<<endl;
    cout<<"base  : "; cin>>b;
    cout<<"height: "; cin>>h;
    cout<<"area = "
        <<(b*h)/2
        <<" square units "
        <<endl;

    system("pause");
return 0;
}

No comments:

Post a Comment