Computer Science, asked by Anonymous, 3 months ago

C++ program to find area of rectangle and triangle using function by using height h and width w

Answers

Answered by akashrbllps
0

#include <iostream>

using namespce std ;

int Rectangle(int b , int h )

{

           int area = b*h;

           return(area);

}

int Triangle(int b , int h)

{

        int area = 0.5 * b * h;

        return(area);

}

int main ()

{

        int b;

        int h;

        int arear ; int areat

       cout << "base and height : ";

        arear = Rectangle(b , h);

        areat = Ttiangle(b , h);

       cout << area << endl << areat << endl;

      return 0 ;

}

Similar questions