Computer Science, asked by parthyadav8, 4 months ago

Write a program to find the area of a triangle ( Hint : area=1/2 b*h)​

Answers

Answered by valeriy69
3

\large\mathsf\color{pink}{Solution\: using\: python\: 3}

b, h = [float(n) for n in input("enter b & h: ").split()]

print(f"area: {(1 / 2) * b * h}")

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Answered by akbarshibbi
1

Answer:

Write a program in which programming language? If java then here's the program:

import java.util.*

class area

{

public static void main ()

{

Scanner sc=newScanner(System.in);

double b,h,a;

System.out.println(" Enter height and base of triangle");

b= sc.nextDouble();

h= sc.nextDouble();

a= 1/2*b*h;

System.out.println(" Area of triangle:"+a);

}

}

Similar questions