April 17, 2021

Area of triangle with given sides using c++

 Question :

if lengths of three sides of the triangle are input through the keyboard ,write a program to find the area of the triangle .

SCREENSHOTS 











SOURCE CODE 


#include <iostream>

#include<conio.h>

#include <math.h>

using namespace std;

int main()

{

int a,b,c ;

float area;

cout <<"Enter 3 sides of triangle : \n";

cin>>a>>b>>c;

area=sqrt(pow(((4*a*a*b*b)-((a*a)+(b*b)-(c*c))),2))/4;

cout<<area;

}

No comments:

Post a Comment

find the cube of the range given digits. || codeAj

Find the cube of the range given Digits. Source Code r= int ( input ( "enter the range of digit : " )) def number_conter (n): ...