- 1

Give coding to find the area of triangle

give programing

26th Jun 2017, 1:12 PM
Anish Sadhu
Anish Sadhu - avatar
5 Respuestas
+ 1
The area if a Triangle is Area=1/2 * h * b All you have to do is get height and base. The plug them into the formula. import java.util.Scanner; public class Program { public static void main(String[] args) { double h, b, area; Scanner scan=new Scanner(System.in); h=scan.nextInt(); b=scan.nextInt(); area=.5 * (h*b); System.out.println(area); } }
26th Jun 2017, 1:42 PM
LordHill
LordHill - avatar
+ 1
Int sideA, sideB, sideC; Cout<<"ENTER the lengths of each side:"; cin<<sideA<<sideB<<sideC; cout<<"The Area is: << (sideA * sideB * sideC)<<endl; hope you understand.
26th Jun 2017, 1:26 PM
Nura Programmer
Nura Programmer - avatar
0
can u plz help me in giving the coding of area of a rectangle
26th Jun 2017, 1:49 PM
Anish Sadhu
Anish Sadhu - avatar
0
I did. the code is there. the entire program is written. I also gave you the formula to figure out area of a Triangle. I don't know what else you want.
26th Jun 2017, 1:51 PM
LordHill
LordHill - avatar
- 1
thank u so much plz can u give me the programing of the area of a rectangle
26th Jun 2017, 1:28 PM
Anish Sadhu
Anish Sadhu - avatar