Area of Triangle using Side | C ++ program to calculate the area of a triangle when the length of two adjacent sides and the angle between them is provided ; Function to return the area of triangle using Side - Angle - Side formula ; Driver Code ; Function Call ; Print the final answer
#include <bits/stdc++.h> NEW_LINE using namespace std ; float Area_of_Triangle ( int a , int b , int k ) { float area = ( float ) ( ( 1 / 2.0 ) * a * b * ( sin ( k ) ) ) ; return area ; } int main ( ) { int a = 9 ; int b = 12 ; int k = 2 ; float ans = Area_of_Triangle ( a , b , k ) ; cout << ans << endl ; }